Add rendering for UsageContext
This commit is contained in:
parent
b42c908328
commit
be8276bd4a
|
@ -67,6 +67,7 @@ import org.hl7.fhir.r5.model.Timing.EventTiming;
|
||||||
import org.hl7.fhir.r5.model.Timing.TimingRepeatComponent;
|
import org.hl7.fhir.r5.model.Timing.TimingRepeatComponent;
|
||||||
import org.hl7.fhir.r5.model.Timing.UnitsOfTime;
|
import org.hl7.fhir.r5.model.Timing.UnitsOfTime;
|
||||||
import org.hl7.fhir.r5.model.UriType;
|
import org.hl7.fhir.r5.model.UriType;
|
||||||
|
import org.hl7.fhir.r5.model.UsageContext;
|
||||||
import org.hl7.fhir.r5.model.ValueSet;
|
import org.hl7.fhir.r5.model.ValueSet;
|
||||||
import org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent;
|
import org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent;
|
||||||
import org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent;
|
import org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent;
|
||||||
|
@ -1517,6 +1518,12 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
||||||
x.addText(!p.hasEnd() ? "(ongoing)" : displayDateTime(p.getEndElement()));
|
x.addText(!p.hasEnd() ? "(ongoing)" : displayDateTime(p.getEndElement()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void renderUsageContext(XhtmlNode x, UsageContext u) throws FHIRFormatError, DefinitionException, IOException {
|
||||||
|
renderCoding(x, u.getCode());
|
||||||
|
x.tx(": ");
|
||||||
|
render(x, u.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
public void renderDataRequirement(XhtmlNode x, DataRequirement dr) throws FHIRFormatError, DefinitionException, IOException {
|
public void renderDataRequirement(XhtmlNode x, DataRequirement dr) throws FHIRFormatError, DefinitionException, IOException {
|
||||||
XhtmlNode tbl = x.table("grid");
|
XhtmlNode tbl = x.table("grid");
|
||||||
XhtmlNode tr = tbl.tr();
|
XhtmlNode tr = tbl.tr();
|
||||||
|
|
|
@ -485,8 +485,11 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
||||||
} else if (e instanceof Resource) {
|
} else if (e instanceof Resource) {
|
||||||
return;
|
return;
|
||||||
} else if (e instanceof DataRequirement) {
|
} else if (e instanceof DataRequirement) {
|
||||||
DataRequirement p = (DataRequirement) e;
|
DataRequirement p = (DataRequirement) e;
|
||||||
renderDataRequirement(x, p);
|
renderDataRequirement(x, p);
|
||||||
|
} else if (e instanceof UsageContext) {
|
||||||
|
UsageContext p = (UsageContext) e;
|
||||||
|
renderUsageContext(x, p);
|
||||||
} else if (e instanceof PrimitiveType) {
|
} else if (e instanceof PrimitiveType) {
|
||||||
x.tx(((PrimitiveType) e).primitiveValue());
|
x.tx(((PrimitiveType) e).primitiveValue());
|
||||||
} else if (e instanceof ElementDefinition) {
|
} else if (e instanceof ElementDefinition) {
|
||||||
|
|
Loading…
Reference in New Issue