MedicationRequest: missing dates replaced with Extension Objects

88 views
Skip to first unread message
Assigned to esmeralda...@gmail.com by me

Francesca Ricci-Tam

unread,
Nov 1, 2021, 3:01:03 PM11/1/21
to Cerner FHIR Developers
Hello,

we are testing our app (confidential patient-facing) by fetching resources for different test patients of the Smart family. Certain MedicationRequest resources for Wilma Smart are causing our code to throw the following error:

dosageInstruction.0.timing.repeat.boundsPeriod.start: Cast to date failed for value "{
  extension: [
    {
      valueCode: 'not-permitted',
    }
  ]
}"

If I understand correctly, this is because the dosageInstruction[i].timing.repeat.boundsPeriod.start field is supposed to contain a Date, according to the HL7 specs, but in these particular documents, there is no Date and instead the field contains an Extension object, which throws off our code since it expects a Date.
Is this normal? Would such an issue be encountered in production data as well?
The documents affected are: MedicationRequest/319129181, MedicationRequest/335225101, MedicationRequest/335225087, MedicationRequest/335225073, MedicationRequest/335225059, MedicationRequest/335214239, MedicationRequest/335172621

Thanks,

Francesca

Francesca Ricci-Tam

unread,
Nov 5, 2021, 12:17:49 PM11/5/21
to Cerner FHIR Developers
Checking in again for confirmation -- is this a normal thing to encounter? (i.e., replacing missing data in a FHIR resource with an Extension object, regardless of data type?)

Esmeralda Bolanos (Cerner)

unread,
Nov 17, 2021, 11:52:17 AM11/17/21
to Cerner FHIR Developers
Greetings, 

There are different scenarios on when a field would be replaced by a data-absent-reason extension. Usually it is CodeableConcept fields. Please see http://fhir.cerner.com/millennium/r4/#handling-required-fields to learn about the scenarios where a CodeableConcept DataAbsentReason would be returned.

In the case of MedicationRequest, the dosageInstruction.0.timing.repeat.boundsPeriod.start is replaced by a DataAbsentReason Extension, not a CodeableConcept DataAbsentReason since the dosageInstruction.0.timing.repeat.boundsPeriod.start is not a CodeableConcept. This extension will be returned in the case that the start date happens after the end date of the medication, which is true for all of the MedicationRequest examples you provided.

Thank you,
   Esme (Cerner)
Reply all
Reply to author
Forward
0 new messages