Skip to content

german HL7 name.prefix.extension #2116

Answered by mbaltus
MichaelStrzata asked this question in Q&A
Discussion options

You must be logged in to vote

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:

var hn = new HumanName();
var prefix = new FhirString("Prof.");
prefix.AddExtension("http:https://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier", new Code("AC"));
hn.PrefixElement.Add(prefix);

var prefix2 = new FhirString("Dr.");
prefix2.AddExtension("http:https://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 o…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@MichaelStrzata
Comment options

@mbaltus
Comment options

@MichaelStrzata
Comment options

@mbaltus
Comment options

@MichaelStrzata
Comment options

Answer selected by marcovisserFurore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants