CodeableConceptDt componentCode = new CodeableConceptDt(ob.observationConcept.getVocabulary().getSystemUri(),
ob.observationConcept.getConceptCode());
componentCode.getCodingFirstRep().setDisplay(ob.observationConcept.getName());
comp.setCode(componentCode);
IDatatype compValue = null;
<BUG>if (ob.valueAsString != null) {
compValue = new StringDt(ob.valueAsString);
} else if (ob.valueAsNumber != null) {
QuantityDt quantity = new QuantityDt(ob.valueAsNumber.doubleValue());
quantity.setUnit(ob.unit.getConceptCode());</BUG>
quantity.setCode(ob.unit.getConceptCode());

CodeableConceptDt componentCode = new CodeableConceptDt(ob.observationConcept.getVocabulary().getSystemUri(),
ob.observationConcept.getConceptCode());
componentCode.getCodingFirstRep().setDisplay(ob.observationConcept.getName());
comp.setCode(componentCode);
IDatatype compValue = null;
if (ob.valueAsNumber != null) {
QuantityDt quantity = new QuantityDt(ob.valueAsNumber.doubleValue());
if (ob.unit != null) {
quantity.setUnit(ob.unit.getConceptCode());
