lib/health-data-standards/models/medication.rb in health-data-standards-3.6.1 vs lib/health-data-standards/models/medication.rb in health-data-standards-3.7.0

- old
+ new

@@ -6,21 +6,38 @@ field :statusOfMedication, as: :status_of_medication, type: Hash embeds_many :fulfillmentHistory, class_name: 'FulfillmentHistory' embeds_many :orderInformation, class_name: 'OrderInformation' field :route, type: Hash - field :site, type: Hash + field :anatomical_approach, type: Hash field :doseRestriction, as: :dose_restriction, type: Hash field :fulfillmentInstructions, as: :fulfillment_instructions, type: String field :indication, type: Hash field :productForm, as: :product_form, type: Hash field :vehicle, type: Hash field :reaction, type: Hash field :deliveryMethod, as: :delivery_method, type: Hash field :patientInstructions, as: :patient_instructions, type: String field :doseIndicator, as: :dose_indicator, type: String + field :method , type: Hash + field :active_datetime , type: Integer + field :signed_datetime , type: Integer + + # This is used for Medicaton, Order. It is the total number of times a dose of a particular + # medication can be administered. This, coupled with the administrationTiming will + # give the cumulative medication duration. + # E.g. + # allowedAdministrations = 90 doses + # administrationTiming = 1 dose / 12 hours + # cumulativeMedicationDuration = allowedAdministrations / administrationTiming * (time conversion) + # cumulativeMedicationDuration = (90 doses) * (12 hours)/(1 dose) * (1 day)/(24 hours) = 45 days + # Medication, Order can't use fulfillmentHistory because the fulfillment of the + # medication has not yet happened. + # This corresponds to 'repeatNumber' in the QRDA representation + field :allowedAdministrations, as: :allowed_administrations, type: Integer + # There are currently no importers that support this field # It is expected to be a scalar and value, such as 7 days field :cumulativeMedicationDuration, as: :cumulative_medication_duration, type: Hash alias :fulfillment_history :fulfillmentHistory @@ -36,6 +53,6 @@ self.orderInformation.each do |oi| oi.shift_dates(date_diff) end end -end \ No newline at end of file +end