diff --git a/app/models/allergy.js b/app/models/allergy.js new file mode 100644 index 0000000000..84c2ae51e0 --- /dev/null +++ b/app/models/allergy.js @@ -0,0 +1,8 @@ +import AbstractModel from 'hospitalrun/models/abstract'; +import DS from 'ember-data'; + +export default AbstractModel.extend({ + description: DS.attr('string'), + icd9CMCode: DS.attr('string'), + icd10Code: DS.attr('string') +}); diff --git a/app/models/patient.js b/app/models/patient.js index 37061d9017..8298c19cc4 100644 --- a/app/models/patient.js +++ b/app/models/patient.js @@ -12,6 +12,9 @@ export default AbstractModel.extend(DOBDays, PatientName, { address2: DS.attr('string'), address3: DS.attr('string'), address4: DS.attr('string'), + allergies: DS.hasMany('allergy', { + async: true + }), bloodType: DS.attr('string'), clinic: DS.attr('string'), country: DS.attr('string'),