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

Commit

Permalink
Added radioligist to imaging
Browse files Browse the repository at this point in the history
Resolves #62
  • Loading branch information
jkleinsc committed Jul 20, 2015
1 parent 353e2df commit 01d95c7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/admin/lookup/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ export default Ember.ArrayController.extend(BillingCategories, LabPricingTypes,
models: {
pricing: 'type'
}
}, {
name: 'Radiologists',
value: 'radiologists',
model: {
imaging: 'radiologist'
}
}, {
name: 'Vendor',
value: 'vendor_list',
Expand Down
8 changes: 8 additions & 0 deletions app/imaging/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ export default AbstractEditController.extend(ChargeActions, PatientSubmodule, {
}
}.property('canComplete', 'isValid'),

lookupListsToUpdate: [{
name: 'radiologistList',
property: 'radiologist',
id: 'radiologists'
}],

pricingTypeForObjectType: 'Imaging Procedure',
pricingTypes: Ember.computed.alias('controllers.imaging.imagingPricingTypes'),

pricingList: null, //This gets filled in by the route

radiologistList: Ember.computed.alias('controllers.imaging.radiologistList'),

imagingTypeChanged: function() {
this.objectTypeChanged('imagingTypeName', 'imagingType');
}.observes('imagingType'),
Expand Down
4 changes: 4 additions & 0 deletions app/imaging/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
{{/if}}
</div>
{{#if canComplete}}
{{select-or-typeahead property="radiologist"
label="Radiologist" list=radiologistList
prompt=" "
}}
{{em-input property="result" label="Result"}}
{{/if}}
{{em-text property="notes" label="Notes" rows=3 }}
Expand Down
3 changes: 3 additions & 0 deletions app/imaging/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ export default AbstractModuleRoute.extend({
additionalModels: [{
name: 'imagingPricingTypes',
findArgs: ['lookup','imaging_pricing_types']
}, {
name: 'radiologistList',
findArgs: ['lookup','radiologists'],
}],
allowSearch: false,
moduleName: 'imaging',
Expand Down
1 change: 1 addition & 0 deletions app/models/imaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default AbstractModel.extend(DateFormat, ResultValidation, {
imagingType: DS.belongsTo('pricing'),
notes: DS.attr('string'),
patient: DS.belongsTo('patient'),
radiologist: DS.attr('string'),
requestedBy: DS.attr('string'),
requestedDate: DS.attr('date'),
result: DS.attr('string'),
Expand Down

0 comments on commit 01d95c7

Please sign in to comment.