Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #385 from HospitalRun/form-cleanup-first-pass
Browse files Browse the repository at this point in the history
Form cleanup first pass
  • Loading branch information
Joel Glovier committed Mar 19, 2016
2 parents 6504ef3 + 054687b commit 158b614
Show file tree
Hide file tree
Showing 22 changed files with 306 additions and 249 deletions.
2 changes: 1 addition & 1 deletion app/imaging/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{/if}}
</tr>
{{#each model as |imaging|}}
<tr {{action 'editItem' imaging }}>
<tr {{action 'editItem' imaging }} class="clickable">
<td>{{date-format imaging.requestedDate}}</td>
<td>{{imaging.patient.displayName}}</td>
<td>{{imaging.imagingType.name}}</td>
Expand Down
2 changes: 1 addition & 1 deletion app/inventory/listing/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</tr>
{{#each model as |inventory|}}
{{#unless inventory.isNew}}
<tr {{action 'editItem' inventory}}>
<tr {{action 'editItem' inventory}} class="clickable">
<td>{{inventory.friendlyId}}</td>
<td>{{inventory.name}}</td>
<td>{{inventory.inventoryType}}</td>
Expand Down
2 changes: 1 addition & 1 deletion app/invoices/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{/if}}
</tr>
{{#each model as |invoice|}}
<tr {{action 'editItem' invoice}}>
<tr {{action 'editItem' invoice}} class="clickable">
<td class="invoice-number">{{invoice.displayInvoiceNumber}}</td>
<td>{{date-format invoice.billDate}}</td>
<td>{{invoice.status}}</td>
Expand Down
2 changes: 1 addition & 1 deletion app/labs/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{/if}}
</tr>
{{#each model as |lab|}}
<tr {{action 'editItem' lab}}>
<tr {{action 'editItem' lab}} class="clickable">
<td>{{date-format lab.requestedDate}}</td>
<td>{{lab.patient.displayName}}</td>
<td>{{lab.labType.name}}</td>
Expand Down
2 changes: 1 addition & 1 deletion app/medication/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{/if}}
</tr>
{{#each model as |medicationRequest|}}
<tr {{action 'editItem' medicationRequest}}>
<tr {{action 'editItem' medicationRequest}} class="clickable">
<td>{{date-format medicationRequest.prescriptionDate}}</td>
<td>{{medicationRequest.patient.displayName}}</td>
<td>{{medicationRequest.medicationName}}</td>
Expand Down
167 changes: 69 additions & 98 deletions app/patients/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{#em-form model=model submitButton=false bubbles=false }}
{{#unless isNewOrDeleted}}
{{patient-summary patient=model visits=model.visits patientProcedures=patientProcedures disablePatientLink=true }}
<ul class="nav nav-pills" role="tablist">
<ul class="nav nav-pills tab-nav" role="tablist">
<li role="presentation" class="active"><a class="active" href="#general" role="tab" data-toggle="pill" data-test-selector="general-tab">General</a></li>
<li role="presentation"><a href="#photos" role="tab" data-toggle="pill" data-test-selector="photos-tab">Photos</a></li>
<li role="presentation"><a href="#medication" role="tab" data-toggle="pill" data-test-selector="medication-tab">Medication</a></li>
Expand All @@ -17,68 +17,62 @@
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="general">
<div class="panel detail-section">
<div class="panel-heading">
<h3 class="panel-title">
General Information
</h3>
</div>
<div class="panel-body detail-section-content">
<div class="row">
<div class="col-xs-12 col-sm-6">
{{em-input property="friendlyId" label="Id" class="required test-id"}}
{{em-input property="firstName" label="First Name" class="required test-first-name"}}
{{em-input property="middleName" label="Middle Name" class="test-middle-name"}}
{{em-input property="lastName" label="Last Name" class="required test-last-name"}}
{{select-or-typeahead property="sex" label="Sex" list=sexList selection=model.sex}}
{{date-picker property="dateOfBirth" label="Date of Birth" maxDate="now"}}
<div class="form-group">
{{em-input property="friendlyId" label="Id" class="form-input-group required test-id"}}
{{em-input property="firstName" label="First Name" class="form-input-group required test-first-name"}}
{{em-input property="middleName" label="Middle Name" class="form-input-group test-middle-name"}}
{{em-input property="lastName" label="Last Name" class="form-input-group required test-last-name"}}
{{select-or-typeahead property="sex" label="Sex" class="form-input-group" list=sexList selection=model.sex}}
{{date-picker property="dateOfBirth" label="Date of Birth" class="form-input-group " maxDate="now"}}
<div class="form-input-group">
<label class="control-label">Age</label>
<p class="form-control-static">{{model.age}}</p>
</div>
{{em-input property="placeOfBirth" label="Place of Birth"}}
<div class="form-group">
{{em-input property="placeOfBirth" label="Place of Birth" class="form-input-group"}}
<div class="form-input-group">
<label>Patient Type</label>
<div>
{{ext-radio content=patientTypes value=model.patientType showInline=true }}
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
{{select-or-typeahead property="status" label="Patient Status" list=statusList selection=model.status }}
{{em-input property="externalPatientId" label="External Patient Id"}}
{{select-or-typeahead property="status" label="Patient Status" list=statusList selection=model.status class="form-input-group" }}
{{em-input property="externalPatientId" label="External Patient Id" class="form-input-group"}}
{{em-select
prompt=" "
label="Blood Type"
property="bloodType"
content=bloodTypes
class="form-input-group"
}}
{{select-or-typeahead property="clinic" label="Clinic Site" list=clinicList selection=model.clinic }}
{{em-input property="referredBy" label="Referred By"}}
{{date-picker property="referredDate" label="Referred Date"}}
{{em-input property="religion" label="Religion"}}
{{em-input property="parent" label="Parent/Guardian"}}
{{select-or-typeahead property="clinic" label="Clinic Site" list=clinicList selection=model.clinic class="form-input-group"}}
{{em-input property="referredBy" label="Referred By" class="form-input-group"}}
{{date-picker property="referredDate" label="Referred Date" class="form-input-group"}}
{{em-input property="religion" label="Religion" class="form-input-group"}}
{{em-input property="parent" label="Parent/Guardian" class="form-input-group"}}
{{em-select label="Payment Profile"
property="paymentProfile"
content=pricingProfiles
optionValuePath="selectObject"
optionLabelPath="selectObject.name"
prompt=" "
class="form-input-group"
}}
</div>
</div>
</div>
</div>
<div class="panel detail-section">
<div class="panel-heading">
<h3 class="panel-title">
Address/Contact Information
{{#if canAddContact}}
<button type="button" class="btn btn-primary align-right" {{action "showAddContact" bubbles=false on="click"}}>
<span class="octicon octicon-plus"></span>Add Contact
</button>
{{/if}}
</h3>
</div>
{{#if canAddContact}}
<div class="panel-heading">
<button type="button" class="btn btn-primary align-right" {{action "showAddContact" bubbles=false on="click"}}>
<span class="octicon octicon-plus"></span>Add Contact
</button>
</div>
{{/if}}
<div class="panel-body detail-section-content">
<div class="row">
{{em-input property="phone" label="Phone Contact" class="col-xs-12 col-sm-6"}}
Expand Down Expand Up @@ -136,16 +130,13 @@
{{#unless isNewOrDeleted}}
<div role="tabpanel" class="tab-pane" id="photos">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">
Photos
{{#if canAddPhoto}}
<button type="button" class="btn btn-primary align-right" {{action "showAddPhoto" bubbles=false }}>
<span class="octicon octicon-plus"></span>New Photo
</button>
{{/if}}
</h3>
</div>
{{#if canAddPhoto}}
<div class="panel-heading">
<button type="button" class="btn btn-primary align-right" {{action "showAddPhoto" bubbles=false }}>
<span class="octicon octicon-plus"></span>New Photo
</button>
</div>
{{/if}}
<div class="panel-body detail-section-content">
<div class="row">
{{#each model.photos as |photo|}}
Expand Down Expand Up @@ -173,67 +164,55 @@
</div>
<div role="tabpanel" class="tab-pane" id="medication">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">
Medication
{{#if canAddMedication}}
<button type="button" class="btn btn-primary align-right" {{action "newMedication" bubbles=false }}>
<span class="octicon octicon-plus"></span>New Medication
</button>
{{/if}}
</h3>
</div>
{{#if canAddMedication}}
<div class="panel-heading">
<button type="button" class="btn btn-primary align-right" {{action "newMedication" bubbles=false }}>
<span class="octicon octicon-plus"></span>New Medication
</button>
</div>
{{/if}}
<div class="panel-body detail-section-content">
{{partial 'patients/medication'}}
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="imaging">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">
Imaging
{{#if canAddImaging}}
<button type="button" class="btn btn-primary align-right" {{action "newImaging" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Imaging
</button>
{{/if}}
</h3>
</div>
{{#if canAddImaging}}
<div class="panel-heading">
<button type="button" class="btn btn-primary align-right" {{action "newImaging" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Imaging
</button>
</div>
{{/if}}
<div class="panel-body detail-section-content">
{{partial 'patients/imaging'}}
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="labs">
<div class="panel">
{{#if canAddLab}}
<div class="panel-heading">
<h3 class="panel-title">
Labs
{{#if canAddLab}}
<button type="button" class="btn btn-primary align-right" {{action "newLab" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Lab
</button>
{{/if}}
</h3>
</div>
<div class="panel-body detail-section-content">
{{partial 'patients/labs'}}
<button type="button" class="btn btn-primary align-right" {{action "newLab" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Lab
</button>
</div>
{{/if}}
<div class="panel-body detail-section-content">
{{partial 'patients/labs'}}
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="visits">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">
Visits
{{#if canAddVisit}}
<button type="button" class="btn btn-primary align-right" {{action "newVisit" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Visit
</button>
{{/if}}
</h3>
</div>
{{#if canAddVisit}}
<div class="panel-heading">
<button type="button" class="btn btn-primary align-right" {{action "newVisit" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Visit
</button>
</div>
{{/if}}
<div class="panel-body detail-section-content">
<table class="table" >
<tr class="table-header">
Expand Down Expand Up @@ -267,16 +246,13 @@
</div>
</div>
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">
Appointments
{{#if canAddAppointment}}
<button type="button" class="btn btn-primary align-right" {{action "newAppointment" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Appointment
</button>
{{/if}}
</h3>
</div>
{{#if canAddAppointment}}
<div class="panel-heading">
<button type="button" class="btn btn-primary align-right" {{action "newAppointment" bubbles=false }}>
<span class="octicon octicon-plus"></span> New Appointment
</button>
</div>
{{/if}}
<div class="panel-body detail-section-content">
<table class="table">
<tr class="table-header">
Expand Down Expand Up @@ -313,11 +289,6 @@
{{#if canAddSocialWork}}
<div role="tabpanel" class="tab-pane" id="social">
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title">
Social Work Details
</h3>
</div>
<div class="panel-body detail-section-content">
<h4>
Family Information
Expand Down
2 changes: 1 addition & 1 deletion app/patients/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</thead>
<tbody>
{{#each model as |patient|}}
<tr {{action 'editItem' patient}}>
<tr {{action 'editItem' patient}} class="clickable">
<td>{{patient.displayPatientId}}</td>
<td>{{patient.firstName}}</td>
<td>{{patient.lastName}}</td>
Expand Down
2 changes: 1 addition & 1 deletion app/pricing/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{{/if}}
</tr>
{{#each model as |pricingItem|}}
<tr {{action 'editItem' pricingItem}}>
<tr {{action 'editItem' pricingItem}} class="clickable">
{{#if showCategory}}
<td>{{pricingItem.category}}</td>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion app/pricing/profiles/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{/if}}
</tr>
{{#each model as |profile|}}
<tr {{action 'editItem' profile}}>
<tr {{action 'editItem' profile}} class="clickable">
<td class="pricing-profile-name">{{profile.name}}</td>
<td>{{profile.discountAmount}}</td>
<td>{{profile.discountPercentage}}</td>
Expand Down
12 changes: 2 additions & 10 deletions app/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ body {
&.ember-application {
padding-left: 275px; // to accomodate for .sidebar-nav
}

// Make cursor appear to be clickable on rows
th,
td,
tr,
div {
&[data-ember-action] {
cursor: pointer;
}
}
}

.clickable { cursor: pointer; }
28 changes: 5 additions & 23 deletions app/styles/_bootstrap-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -267,29 +267,11 @@
}
}

.panel-primary > .panel-heading {
background-image: linear-gradient(to bottom,#428bca 0%,#357ebd 100%);
background-repeat: repeat-x;
}

.panel-success > .panel-heading {
background-image: linear-gradient(to bottom,#dff0d8 0%,#d0e9c6 100%);
background-repeat: repeat-x;
}

.panel-info > .panel-heading {
background-image: linear-gradient(to bottom,#d9edf7 0%,#c4e3f3 100%);
background-repeat: repeat-x;
}

.panel-warning > .panel-heading {
background-image: linear-gradient(to bottom,#fcf8e3 0%,#faf2cc 100%);
background-repeat: repeat-x;
}

.panel-danger > .panel-heading {
background-image: linear-gradient(to bottom,#f2dede 0%,#ebcccc 100%);
background-repeat: repeat-x;
.panel-heading {
border-radius: 3px;
background-color: $blue_light2;
padding: 10px 15px;
color: $navy;
}

.well {
Expand Down
Loading

0 comments on commit 158b614

Please sign in to comment.