Stream: dotnet
Topic: Implementing Vital Signs in C#
Jerry Xu (Feb 14 2022 at 08:42):
Hi all. I just started implementing Vital Signs in C# and I don't have any previous experience with this. I'm having trouble finding the namespace I should use for Vitals. Could anyone point me the right direction? Thanks
Brian Postlethwaite (Feb 14 2022 at 08:59):
The vital signs are a profile on Observation, so you need to create Observation resources, then populate values as per the profile.
Noting that obs.value = new FhirString("string value")
Brian Postlethwaite (Feb 14 2022 at 09:01):
Or if it's a Coding, new Coding("http://blah", "code", "display val")
Brian Postlethwaite (Feb 14 2022 at 09:02):
I assume you've already found the nuget package from Firely R4
Jerry Xu (Feb 14 2022 at 09:09):
Hi Brian, thanks for the explanation. I'm trying to implement the Vital Signs resource containing irb, mrn, study id, etc., which falls under Observations I believe. And I think that's also what you meant. I switched from php to C# so I guess I'm still getting used to the change. I saw a namespace called FhirPatient = Hl7.Fhir.Model.Patient
in C# and I was wondering if there is something similar for Vitals or Observations as well.
Brian Postlethwaite (Feb 14 2022 at 09:19):
Yep, HL7.Fhir.Model.Observation
Brian Postlethwaite (Feb 14 2022 at 09:20):
For extensions, there are some helper extension methods obs.SetExtension("blah", new FhirString("jdjd")
Brian Postlethwaite (Feb 14 2022 at 09:20):
And if I remember rightly, SetStringExtension
Jerry Xu (Feb 14 2022 at 09:22):
Great! Thank you. I'll look into it and hopefully I don't have to bother you anymore.
Jerry Xu (Feb 14 2022 at 09:43):
Oh and where should I go to find syntax of the helper functions like setting ID or adding identifier to the resource? Just trying to figure out how to efficiently navigate through the library since the extension method you just mentioned is not in the Observation definition. I assume there is an extension namespace I should import?
Brian Postlethwaite (Feb 14 2022 at 09:52):
It should be just looking at the relevant vital sign profile and working out what property they need to have things set.
(example instance might even help there too)
Last updated: Apr 12 2022 at 19:14 UTC