german HL7 name.prefix.extension #2116
-
Hallo, and sorry for my english language... Here i have some problems, and everyone i told my problem, i get a link to FIRE.LY to see, how it works with Birthdate/birthdateElement. With FamilyElement it will add en Extension too, same like birthday...but not with HumanName.prefix.extension... Please dont link me to https://docs.fire.ly/projects/Firely-NET-SDK/model/extensions.html... this isnt my problem... i like to know, can SDK 4.0.0 humanName.prefix.Extension (and address.line.extension) and how can i get this... thanx for the help sinceraly Michael |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hello Michael, You are running into your issue because the HumanName.prefix is a list of prefixes instead of a singular field. var hn = new HumanName();
var prefix = new FhirString("Prof.");
prefix.AddExtension("http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier", new Code("AC"));
hn.PrefixElement.Add(prefix);
var prefix2 = new FhirString("Dr.");
prefix2.AddExtension("http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier", new Code("AC"));
hn.PrefixElement.Add(prefix2);
yourPatient.Name.Add(hn); You are supposed to create a list of prefixes if you have multiple ones. As you can see, I've only used "Prof." for this first prefix, and repeated the steps for each additional prefix so you get an actual list. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hello Michael,
You are running into your issue because the HumanName.prefix is a list of prefixes instead of a singular field.
This means that the AddExtension method is not present, since you need to add the extension to 1 item in the list. Here's a way to do that:
You are supposed to create a list o…