alex_empallo
10/28/2024, 3:16 PMMedicationAdministration resources within a FHIR Bundle. Every attempt to upload results in this error:
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"text": "reference.reference?.startsWith is not a function"
}
}
]
}
I’ve tried various modifications to the resource (e.g., changing medication references, removing encounter, using occurrenceDateTime), but the error persists. Consequently, no MedicationAdministration entries appear at https://app.medplum.com/MedicationAdministration. Other resources like Patient, Condition, and Observation upload and display with no issues.
Any ideas on what could be causing this? I’d appreciate any help! Thanks!rahul1
10/28/2024, 3:35 PMalex_empallo
10/28/2024, 4:29 PMPatient resource here is fine, but both of the MedicationAdministration resources yield the error from my previous message.
I'm kind of working with dummy files for now, hence the ??? values for certain "unimportant" fields.rahul1
10/28/2024, 8:03 PMrahul1
10/28/2024, 8:04 PM"medication": {
"reference": "#medication_code"
},rahul1
10/28/2024, 8:05 PM#medication_code reference is not a valid reference, since it points to a contained resource which is not presentrahul1
10/28/2024, 8:05 PMalex_empallo
10/29/2024, 3:18 PMMedicationAdministration resource to use medicationReference and moved the medication details into a "contained" key/resource. I also used effectiveDateTime to track DTM and removed the invalid encounter property. The upload is now working correctly, really appreciate your help!