Stream: implementers
Topic: Patient objects serialize to XML issue
Ayaz (Feb 22 2021 at 22:16):
Dear Jean
Thanks for your prompt response and valuable advise. I am just compiling the code mention in the file
https://github.com/angusmillar/SimpleFhir/blob/master/SimplePatient/Program.cs
However, it display error message on the line
string xml = Hl7.Fhir.Serialization.FhirSerializer.SerializeResourceToXml(MyPatient);
The error message is like
" The type or namespace name 'FhirSerializer' does not exist in the namespace 'Hl7.Fhir.Serialization' (are you missing an assembly reference?) "
I installed the following libraries
- HL7.Fhir.Serialization ,
- HL7.Fhir. STU3,
- HL7.FhirPath
I don't know what's wrong in it.
I would be so thankful if you open this file and check the code. Please give me your advise.
Looking forward to hearing from you soon.
Thanks,
Ayaz
Lloyd McKenzie (Feb 23 2021 at 00:48):
@Ward Weistra
Mirjam Baltus (Feb 23 2021 at 10:22):
@Ayaz As of the 2.0 version of the SDK, the FhirSerializer and FhirParser have been removed. They were obsolete before that, and are replaced by FhirXmlSerializer and FhirXmlParser classes (+ also the json equivalents). See https://github.com/FirelyTeam/firely-net-sdk/wiki/Breaking-changes-in-2.0.
See https://docs.fire.ly/projects/Firely-NET-SDK/parsing.html for more information and code examples of how to use these classes.
Ayaz (Feb 23 2021 at 18:06):
Hello Mirjam,
Thanks for your message and shared information. It is great, I will check it and will come back to you if need any further help.
Thanks,
Ayaz
Last updated: Apr 12 2022 at 19:14 UTC