Stream: implementers
Topic: Extension with ValueCode
Zak Guler (Jun 23 2020 at 14:57):
HI, I know how to build extension in JAVA (url, ValueString) but not (url, valueCode):
EX:
new Extension("http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", new StringType("F"));
output:
{ "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex",
"valueString": "F"
}
what I need is the value to be a valuecode type:
{ "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex",
"valueCode": "F"
}
any help on how to do do this?
thanx
Zak
Lloyd McKenzie (Jun 23 2020 at 15:23):
You might ask on the #hapi stream. To clarify, you're wanting to get valueCode, NOT valueString, correct?
Zak Guler (Jun 23 2020 at 15:46):
will do.
Yes correct
Zak Guler (Jun 23 2020 at 17:56):
found the answer:
.setUrl("http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"").setValue(new CodeType("F"));
Last updated: Apr 12 2022 at 19:14 UTC