FHIR Chat · Medications to MedicationRequest · dotnet

Stream: dotnet

Topic: Medications to MedicationRequest


view this post on Zulip Marco Rudolph (Jun 06 2019 at 11:54):

Hi, i try to add a List of Medication to a MedicationRequest.. How can i do that?

view this post on Zulip Michel Rutten (Jun 06 2019 at 12:08):

The MedicationRequest.medication element only accepts a single value...
http://hl7.org/fhir/medicationrequest-definitions.html#MedicationRequest.medication_x_

view this post on Zulip Marco Rudolph (Jun 06 2019 at 12:25):

Hey thanks.. last step: how can i assign a Medication to the Medicationfield of a MedicationRequest?
Where are these basics documented?

"MedicationRequest mediRequest = new MedicationRequest();
Medication medi = new Medication();
mediRequest.Medication = medi;" <- does not work.

view this post on Zulip Michel Rutten (Jun 06 2019 at 12:29):

Hi @Marco Rudolph, the MedicationRequest.medication field accepts a ResourceReference to an (existing) MedicationRequest instance, which you can create and assign as follows:

var mr = new MedicationRequest();
mr.Medication = new ResourceReference("http://example.org/fhir/MedicationRequest/123");

view this post on Zulip Vadim Peretokin (Jun 06 2019 at 12:35):

@Marco Rudolph

Where are these basics documented?

http://docs.simplifier.net/fhirnetapi/index.html :)

view this post on Zulip Brian Postlethwaite (Jun 06 2019 at 12:36):

Anyone think that code generating extension acessor methods for these properties as strongly typed would be useful?
E.g. GetMedicatiinReference() and GetMedicationCode()

view this post on Zulip Michel Rutten (Jun 06 2019 at 13:19):

I do notice repeated questions about assigning choice types. Providing additional explicit accessors would increase discoverability.

view this post on Zulip Brian Postlethwaite (Jun 07 2019 at 00:22):

Wasn't sure if generating them in the model or as extensions was better...

view this post on Zulip Marco Rudolph (Jun 07 2019 at 11:53):

ok thank you..

@Michel Rutten
Are you sure with "http://example.org/fhir/MedicationRequest/123" ?
"http://example.org/fhir/Medication/123" would make sense to me.

view this post on Zulip Marco Rudolph (Jun 07 2019 at 12:29):

..because i need
<medicationReference>
<reference value="/Medication/987654"/>
</medicationReference>

view this post on Zulip Yunwei Wang (Jun 10 2019 at 18:21):

Good catch


Last updated: Apr 12 2022 at 19:14 UTC