I'm not familiar with JSON and FHIR. I have a request to a FHIR server that returns medication dispense object. Here is the result of the request contain in a string
{ "resourceType": "Bundle", "type": "document", "entry": [ { "fullUrl": "/medicationdispense/c7c7e373-02c0-4ffc-9894-eee0de249a25/1000424", "resource": { "resourceType": "MedicationDispense", "id": "1", "extension": [ { "url": "uri:domedic:pharmacy:uuid", "valueString": "dc28f64f-aef4-4d64-8cb5-b5a2020fdcdc" }, { "url": "uri:domedic:prescription:renewals:left", "valueInteger": 24 }, { "url": "uri:domedic:medication:isoob", "valueBoolean": true } ], "status": "on-hold", "category": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category", "code": "community" } ], "text": "Includes requests for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc.)" }, "medicationCodeableConcept": { "extension": [ { "url": "uri:domedic:medication:name", "valueString": "SANDOZ FENTANYL" }, { "url": "uri:domedic:medication:strength", "valueString": "50 MCG-H" }, { "url": "uri:domedic:medication:form", "valueString": "TIMBRE" }, { "url": "http://hl7.org/fhir/NamingSystem/ca-hc-din", "valueString": "02327147" } ], "coding": [ { "system": "http://hl7.org/fhir/NamingSystem/ca-hc-din", "code": "02327147", "display": "SANDOZ FENTANYL 50 MCG-H" } ], "text": "SANDOZ FENTANYL 50 MCG-H" }, "subject": { "reference": "patient/c7c7e373-02c0-4ffc-9894-eee0de249a25", "identifier": { "use": "official", "system": "uri:domedic:patient:uuid", "value": "c7c7e373-02c0-4ffc-9894-eee0de249a25" } }, "authorizingPrescription": [ { "reference": "medicationrequest/c7c7e373-02c0-4ffc-9894-eee0de249a25/1000424", "identifier": { "use": "usual", "system": "uri:domedic:medicationrequest:number", "value": "1000424" } } ], "quantity": { "value": 2.0000 }, "whenPrepared": "2021-10-29T00:00:00+00:00", "dosageInstruction": [ { "extension": [ { "url": "uri:domedic:dosage:discriminator", "valueInteger": 2 }, { "url": "uri:domedic:dosage:id", "valueInteger": 12042 } ], "sequence": 1, "text": "1ERE RX EN DATE DU JOUR PUIS LES 2 AUTRES SERONT DES REN. POSTDATES. CESSATION FUTURE SUIVRA", "timing": { "event": [ "2021-10-29T08:00:00+00:00", "2021-10-29T21:00:00+00:00" ], "repeat": { "boundsPeriod": { "start": "2021-10-29T00:00:00+00:00" }, "period": 3.0, "periodUnit": "d" } }, "doseAndRate": [ { "doseQuantity": { "value": 1.0000 } } ] }, { "extension": [ { "url": "uri:domedic:dosage:discriminator", "valueInteger": 2 }, { "url": "uri:domedic:dosage:id", "valueInteger": 12042 } ], "sequence": 2, "text": "1ERE RX EN DATE DU JOUR PUIS LES 2 AUTRES SERONT DES REN. POSTDATES. CESSATION FUTURE SUIVRA", "timing": { "event": [ "2021-10-30T08:00:00+00:00", "2021-10-30T21:00:00+00:00", "2021-10-31T08:00:00+00:00", "2021-10-31T21:00:00+00:00" ], "repeat": { "boundsPeriod": { "start": "2021-10-29T00:00:00+00:00" }, "period": 3.0, "periodUnit": "d" } }, "doseAndRate": [ { "doseQuantity": { "value": 0.0000 } } ] } ] } } ] } I need to "cast" this to a HL7.FHIR.Model.MedicationDispense type object, but I can't find how to do it.
can anyone help me on this please? thank for your time and help