use of org.hl7.fhir.dstu3.model.RelatedArtifact in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeActivityDefinition.
protected void composeActivityDefinition(Complex parent, String parentType, String name, ActivityDefinition element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "ActivityDefinition", name, element, index);
if (element.hasUrlElement())
composeUri(t, "ActivityDefinition", "url", element.getUrlElement(), -1);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "ActivityDefinition", "identifier", element.getIdentifier().get(i), i);
if (element.hasVersionElement())
composeString(t, "ActivityDefinition", "version", element.getVersionElement(), -1);
if (element.hasNameElement())
composeString(t, "ActivityDefinition", "name", element.getNameElement(), -1);
if (element.hasTitleElement())
composeString(t, "ActivityDefinition", "title", element.getTitleElement(), -1);
if (element.hasSubtitleElement())
composeString(t, "ActivityDefinition", "subtitle", element.getSubtitleElement(), -1);
if (element.hasStatusElement())
composeEnum(t, "ActivityDefinition", "status", element.getStatusElement(), -1);
if (element.hasExperimentalElement())
composeBoolean(t, "ActivityDefinition", "experimental", element.getExperimentalElement(), -1);
if (element.hasSubject())
composeType(t, "ActivityDefinition", "subject", element.getSubject(), -1);
if (element.hasDateElement())
composeDateTime(t, "ActivityDefinition", "date", element.getDateElement(), -1);
if (element.hasPublisherElement())
composeString(t, "ActivityDefinition", "publisher", element.getPublisherElement(), -1);
for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "ActivityDefinition", "contact", element.getContact().get(i), i);
if (element.hasDescriptionElement())
composeMarkdown(t, "ActivityDefinition", "description", element.getDescriptionElement(), -1);
for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "ActivityDefinition", "useContext", element.getUseContext().get(i), i);
for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "ActivityDefinition", "jurisdiction", element.getJurisdiction().get(i), i);
if (element.hasPurposeElement())
composeMarkdown(t, "ActivityDefinition", "purpose", element.getPurposeElement(), -1);
if (element.hasUsageElement())
composeString(t, "ActivityDefinition", "usage", element.getUsageElement(), -1);
if (element.hasCopyrightElement())
composeMarkdown(t, "ActivityDefinition", "copyright", element.getCopyrightElement(), -1);
if (element.hasApprovalDateElement())
composeDate(t, "ActivityDefinition", "approvalDate", element.getApprovalDateElement(), -1);
if (element.hasLastReviewDateElement())
composeDate(t, "ActivityDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1);
if (element.hasEffectivePeriod())
composePeriod(t, "ActivityDefinition", "effectivePeriod", element.getEffectivePeriod(), -1);
for (int i = 0; i < element.getTopic().size(); i++) composeCodeableConcept(t, "ActivityDefinition", "topic", element.getTopic().get(i), i);
for (int i = 0; i < element.getAuthor().size(); i++) composeContactDetail(t, "ActivityDefinition", "author", element.getAuthor().get(i), i);
for (int i = 0; i < element.getEditor().size(); i++) composeContactDetail(t, "ActivityDefinition", "editor", element.getEditor().get(i), i);
for (int i = 0; i < element.getReviewer().size(); i++) composeContactDetail(t, "ActivityDefinition", "reviewer", element.getReviewer().get(i), i);
for (int i = 0; i < element.getEndorser().size(); i++) composeContactDetail(t, "ActivityDefinition", "endorser", element.getEndorser().get(i), i);
for (int i = 0; i < element.getRelatedArtifact().size(); i++) composeRelatedArtifact(t, "ActivityDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i);
for (int i = 0; i < element.getLibrary().size(); i++) composeCanonical(t, "ActivityDefinition", "library", element.getLibrary().get(i), i);
if (element.hasKindElement())
composeEnum(t, "ActivityDefinition", "kind", element.getKindElement(), -1);
if (element.hasProfileElement())
composeCanonical(t, "ActivityDefinition", "profile", element.getProfileElement(), -1);
if (element.hasCode())
composeCodeableConcept(t, "ActivityDefinition", "code", element.getCode(), -1);
if (element.hasIntentElement())
composeEnum(t, "ActivityDefinition", "intent", element.getIntentElement(), -1);
if (element.hasPriorityElement())
composeEnum(t, "ActivityDefinition", "priority", element.getPriorityElement(), -1);
if (element.hasDoNotPerformElement())
composeBoolean(t, "ActivityDefinition", "doNotPerform", element.getDoNotPerformElement(), -1);
if (element.hasTiming())
composeType(t, "ActivityDefinition", "timing", element.getTiming(), -1);
if (element.hasLocation())
composeReference(t, "ActivityDefinition", "location", element.getLocation(), -1);
for (int i = 0; i < element.getParticipant().size(); i++) composeActivityDefinitionActivityDefinitionParticipantComponent(t, "ActivityDefinition", "participant", element.getParticipant().get(i), i);
if (element.hasProduct())
composeType(t, "ActivityDefinition", "product", element.getProduct(), -1);
if (element.hasQuantity())
composeQuantity(t, "ActivityDefinition", "quantity", element.getQuantity(), -1);
for (int i = 0; i < element.getDosage().size(); i++) composeDosage(t, "ActivityDefinition", "dosage", element.getDosage().get(i), i);
for (int i = 0; i < element.getBodySite().size(); i++) composeCodeableConcept(t, "ActivityDefinition", "bodySite", element.getBodySite().get(i), i);
for (int i = 0; i < element.getSpecimenRequirement().size(); i++) composeReference(t, "ActivityDefinition", "specimenRequirement", element.getSpecimenRequirement().get(i), i);
for (int i = 0; i < element.getObservationRequirement().size(); i++) composeReference(t, "ActivityDefinition", "observationRequirement", element.getObservationRequirement().get(i), i);
for (int i = 0; i < element.getObservationResultRequirement().size(); i++) composeReference(t, "ActivityDefinition", "observationResultRequirement", element.getObservationResultRequirement().get(i), i);
if (element.hasTransformElement())
composeCanonical(t, "ActivityDefinition", "transform", element.getTransformElement(), -1);
for (int i = 0; i < element.getDynamicValue().size(); i++) composeActivityDefinitionActivityDefinitionDynamicValueComponent(t, "ActivityDefinition", "dynamicValue", element.getDynamicValue().get(i), i);
}
use of org.hl7.fhir.dstu3.model.RelatedArtifact in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeLibrary.
protected void composeLibrary(Complex parent, String parentType, String name, Library element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "Library", name, element, index);
if (element.hasUrlElement())
composeUri(t, "Library", "url", element.getUrlElement(), -1);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Library", "identifier", element.getIdentifier().get(i), i);
if (element.hasVersionElement())
composeString(t, "Library", "version", element.getVersionElement(), -1);
if (element.hasNameElement())
composeString(t, "Library", "name", element.getNameElement(), -1);
if (element.hasTitleElement())
composeString(t, "Library", "title", element.getTitleElement(), -1);
if (element.hasSubtitleElement())
composeString(t, "Library", "subtitle", element.getSubtitleElement(), -1);
if (element.hasStatusElement())
composeEnum(t, "Library", "status", element.getStatusElement(), -1);
if (element.hasExperimentalElement())
composeBoolean(t, "Library", "experimental", element.getExperimentalElement(), -1);
if (element.hasType())
composeCodeableConcept(t, "Library", "type", element.getType(), -1);
if (element.hasSubject())
composeType(t, "Library", "subject", element.getSubject(), -1);
if (element.hasDateElement())
composeDateTime(t, "Library", "date", element.getDateElement(), -1);
if (element.hasPublisherElement())
composeString(t, "Library", "publisher", element.getPublisherElement(), -1);
for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "Library", "contact", element.getContact().get(i), i);
if (element.hasDescriptionElement())
composeMarkdown(t, "Library", "description", element.getDescriptionElement(), -1);
for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "Library", "useContext", element.getUseContext().get(i), i);
for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "Library", "jurisdiction", element.getJurisdiction().get(i), i);
if (element.hasPurposeElement())
composeMarkdown(t, "Library", "purpose", element.getPurposeElement(), -1);
if (element.hasUsageElement())
composeString(t, "Library", "usage", element.getUsageElement(), -1);
if (element.hasCopyrightElement())
composeMarkdown(t, "Library", "copyright", element.getCopyrightElement(), -1);
if (element.hasApprovalDateElement())
composeDate(t, "Library", "approvalDate", element.getApprovalDateElement(), -1);
if (element.hasLastReviewDateElement())
composeDate(t, "Library", "lastReviewDate", element.getLastReviewDateElement(), -1);
if (element.hasEffectivePeriod())
composePeriod(t, "Library", "effectivePeriod", element.getEffectivePeriod(), -1);
for (int i = 0; i < element.getTopic().size(); i++) composeCodeableConcept(t, "Library", "topic", element.getTopic().get(i), i);
for (int i = 0; i < element.getAuthor().size(); i++) composeContactDetail(t, "Library", "author", element.getAuthor().get(i), i);
for (int i = 0; i < element.getEditor().size(); i++) composeContactDetail(t, "Library", "editor", element.getEditor().get(i), i);
for (int i = 0; i < element.getReviewer().size(); i++) composeContactDetail(t, "Library", "reviewer", element.getReviewer().get(i), i);
for (int i = 0; i < element.getEndorser().size(); i++) composeContactDetail(t, "Library", "endorser", element.getEndorser().get(i), i);
for (int i = 0; i < element.getRelatedArtifact().size(); i++) composeRelatedArtifact(t, "Library", "relatedArtifact", element.getRelatedArtifact().get(i), i);
for (int i = 0; i < element.getParameter().size(); i++) composeParameterDefinition(t, "Library", "parameter", element.getParameter().get(i), i);
for (int i = 0; i < element.getDataRequirement().size(); i++) composeDataRequirement(t, "Library", "dataRequirement", element.getDataRequirement().get(i), i);
for (int i = 0; i < element.getContent().size(); i++) composeAttachment(t, "Library", "content", element.getContent().get(i), i);
}
use of org.hl7.fhir.dstu3.model.RelatedArtifact in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeResearchDefinition.
protected void composeResearchDefinition(Complex parent, String parentType, String name, ResearchDefinition element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "ResearchDefinition", name, element, index);
if (element.hasUrlElement())
composeUri(t, "ResearchDefinition", "url", element.getUrlElement(), -1);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "ResearchDefinition", "identifier", element.getIdentifier().get(i), i);
if (element.hasVersionElement())
composeString(t, "ResearchDefinition", "version", element.getVersionElement(), -1);
if (element.hasNameElement())
composeString(t, "ResearchDefinition", "name", element.getNameElement(), -1);
if (element.hasTitleElement())
composeString(t, "ResearchDefinition", "title", element.getTitleElement(), -1);
if (element.hasShortTitleElement())
composeString(t, "ResearchDefinition", "shortTitle", element.getShortTitleElement(), -1);
if (element.hasSubtitleElement())
composeString(t, "ResearchDefinition", "subtitle", element.getSubtitleElement(), -1);
if (element.hasStatusElement())
composeEnum(t, "ResearchDefinition", "status", element.getStatusElement(), -1);
if (element.hasExperimentalElement())
composeBoolean(t, "ResearchDefinition", "experimental", element.getExperimentalElement(), -1);
if (element.hasSubject())
composeType(t, "ResearchDefinition", "subject", element.getSubject(), -1);
if (element.hasDateElement())
composeDateTime(t, "ResearchDefinition", "date", element.getDateElement(), -1);
if (element.hasPublisherElement())
composeString(t, "ResearchDefinition", "publisher", element.getPublisherElement(), -1);
for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "ResearchDefinition", "contact", element.getContact().get(i), i);
if (element.hasDescriptionElement())
composeMarkdown(t, "ResearchDefinition", "description", element.getDescriptionElement(), -1);
for (int i = 0; i < element.getComment().size(); i++) composeString(t, "ResearchDefinition", "comment", element.getComment().get(i), i);
for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "ResearchDefinition", "useContext", element.getUseContext().get(i), i);
for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "ResearchDefinition", "jurisdiction", element.getJurisdiction().get(i), i);
if (element.hasPurposeElement())
composeMarkdown(t, "ResearchDefinition", "purpose", element.getPurposeElement(), -1);
if (element.hasUsageElement())
composeString(t, "ResearchDefinition", "usage", element.getUsageElement(), -1);
if (element.hasCopyrightElement())
composeMarkdown(t, "ResearchDefinition", "copyright", element.getCopyrightElement(), -1);
if (element.hasApprovalDateElement())
composeDate(t, "ResearchDefinition", "approvalDate", element.getApprovalDateElement(), -1);
if (element.hasLastReviewDateElement())
composeDate(t, "ResearchDefinition", "lastReviewDate", element.getLastReviewDateElement(), -1);
if (element.hasEffectivePeriod())
composePeriod(t, "ResearchDefinition", "effectivePeriod", element.getEffectivePeriod(), -1);
for (int i = 0; i < element.getTopic().size(); i++) composeCodeableConcept(t, "ResearchDefinition", "topic", element.getTopic().get(i), i);
for (int i = 0; i < element.getAuthor().size(); i++) composeContactDetail(t, "ResearchDefinition", "author", element.getAuthor().get(i), i);
for (int i = 0; i < element.getEditor().size(); i++) composeContactDetail(t, "ResearchDefinition", "editor", element.getEditor().get(i), i);
for (int i = 0; i < element.getReviewer().size(); i++) composeContactDetail(t, "ResearchDefinition", "reviewer", element.getReviewer().get(i), i);
for (int i = 0; i < element.getEndorser().size(); i++) composeContactDetail(t, "ResearchDefinition", "endorser", element.getEndorser().get(i), i);
for (int i = 0; i < element.getRelatedArtifact().size(); i++) composeRelatedArtifact(t, "ResearchDefinition", "relatedArtifact", element.getRelatedArtifact().get(i), i);
for (int i = 0; i < element.getLibrary().size(); i++) composeCanonical(t, "ResearchDefinition", "library", element.getLibrary().get(i), i);
if (element.hasPopulation())
composeReference(t, "ResearchDefinition", "population", element.getPopulation(), -1);
if (element.hasExposure())
composeReference(t, "ResearchDefinition", "exposure", element.getExposure(), -1);
if (element.hasExposureAlternative())
composeReference(t, "ResearchDefinition", "exposureAlternative", element.getExposureAlternative(), -1);
if (element.hasOutcome())
composeReference(t, "ResearchDefinition", "outcome", element.getOutcome(), -1);
}
use of org.hl7.fhir.dstu3.model.RelatedArtifact in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeEvidenceVariable.
protected void composeEvidenceVariable(Complex parent, String parentType, String name, EvidenceVariable element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "EvidenceVariable", name, element, index);
if (element.hasUrlElement())
composeUri(t, "EvidenceVariable", "url", element.getUrlElement(), -1);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "EvidenceVariable", "identifier", element.getIdentifier().get(i), i);
if (element.hasVersionElement())
composeString(t, "EvidenceVariable", "version", element.getVersionElement(), -1);
if (element.hasNameElement())
composeString(t, "EvidenceVariable", "name", element.getNameElement(), -1);
if (element.hasTitleElement())
composeString(t, "EvidenceVariable", "title", element.getTitleElement(), -1);
if (element.hasShortTitleElement())
composeString(t, "EvidenceVariable", "shortTitle", element.getShortTitleElement(), -1);
if (element.hasSubtitleElement())
composeString(t, "EvidenceVariable", "subtitle", element.getSubtitleElement(), -1);
if (element.hasStatusElement())
composeEnum(t, "EvidenceVariable", "status", element.getStatusElement(), -1);
if (element.hasDateElement())
composeDateTime(t, "EvidenceVariable", "date", element.getDateElement(), -1);
if (element.hasPublisherElement())
composeString(t, "EvidenceVariable", "publisher", element.getPublisherElement(), -1);
for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "EvidenceVariable", "contact", element.getContact().get(i), i);
if (element.hasDescriptionElement())
composeMarkdown(t, "EvidenceVariable", "description", element.getDescriptionElement(), -1);
for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "EvidenceVariable", "note", element.getNote().get(i), i);
for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "EvidenceVariable", "useContext", element.getUseContext().get(i), i);
for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "EvidenceVariable", "jurisdiction", element.getJurisdiction().get(i), i);
if (element.hasCopyrightElement())
composeMarkdown(t, "EvidenceVariable", "copyright", element.getCopyrightElement(), -1);
if (element.hasApprovalDateElement())
composeDate(t, "EvidenceVariable", "approvalDate", element.getApprovalDateElement(), -1);
if (element.hasLastReviewDateElement())
composeDate(t, "EvidenceVariable", "lastReviewDate", element.getLastReviewDateElement(), -1);
if (element.hasEffectivePeriod())
composePeriod(t, "EvidenceVariable", "effectivePeriod", element.getEffectivePeriod(), -1);
for (int i = 0; i < element.getTopic().size(); i++) composeCodeableConcept(t, "EvidenceVariable", "topic", element.getTopic().get(i), i);
for (int i = 0; i < element.getAuthor().size(); i++) composeContactDetail(t, "EvidenceVariable", "author", element.getAuthor().get(i), i);
for (int i = 0; i < element.getEditor().size(); i++) composeContactDetail(t, "EvidenceVariable", "editor", element.getEditor().get(i), i);
for (int i = 0; i < element.getReviewer().size(); i++) composeContactDetail(t, "EvidenceVariable", "reviewer", element.getReviewer().get(i), i);
for (int i = 0; i < element.getEndorser().size(); i++) composeContactDetail(t, "EvidenceVariable", "endorser", element.getEndorser().get(i), i);
for (int i = 0; i < element.getRelatedArtifact().size(); i++) composeRelatedArtifact(t, "EvidenceVariable", "relatedArtifact", element.getRelatedArtifact().get(i), i);
if (element.hasTypeElement())
composeEnum(t, "EvidenceVariable", "type", element.getTypeElement(), -1);
for (int i = 0; i < element.getCharacteristic().size(); i++) composeEvidenceVariableEvidenceVariableCharacteristicComponent(t, "EvidenceVariable", "characteristic", element.getCharacteristic().get(i), i);
}
use of org.hl7.fhir.dstu3.model.RelatedArtifact in project org.hl7.fhir.core by hapifhir.
the class ProfileDrivenRenderer method displayLeaf.
private boolean displayLeaf(ResourceWrapper res, BaseWrapper ew, ElementDefinition defn, XhtmlNode x, String name, boolean showCodeDetails, boolean allowLinks) throws FHIRException, UnsupportedEncodingException, IOException {
if (ew == null)
return false;
Base e = ew.getBase();
if (e == null)
return false;
Map<String, String> displayHints = readDisplayHints(defn);
if (name.endsWith("[x]"))
name = name.substring(0, name.length() - 3);
if (!showCodeDetails && e instanceof PrimitiveType && isDefault(displayHints, ((PrimitiveType) e)))
return false;
if (e instanceof StringType) {
x.addText(name + ": " + ((StringType) e).getValue());
return true;
} else if (e instanceof CodeType) {
x.addText(name + ": " + ((CodeType) e).getValue());
return true;
} else if (e instanceof IdType) {
x.addText(name + ": " + ((IdType) e).getValue());
return true;
} else if (e instanceof UriType) {
if (Utilities.isAbsoluteUrlLinkable(((UriType) e).getValue()) && allowLinks) {
x.tx(name + ": ");
x.ah(((UriType) e).getValue()).addText(((UriType) e).getValue());
} else {
x.addText(name + ": " + ((UriType) e).getValue());
}
return true;
} else if (e instanceof DateTimeType) {
x.addText(name + ": " + ((DateTimeType) e).toHumanDisplay());
return true;
} else if (e instanceof InstantType) {
x.addText(name + ": " + ((InstantType) e).toHumanDisplay());
return true;
} else if (e instanceof Extension) {
// x.tx("Extensions: todo");
return false;
} else if (e instanceof org.hl7.fhir.r4b.model.DateType) {
x.addText(name + ": " + ((org.hl7.fhir.r4b.model.DateType) e).toHumanDisplay());
return true;
} else if (e instanceof Enumeration) {
// todo: look up a display name if there is one
x.addText(((Enumeration<?>) e).getValue().toString());
return true;
} else if (e instanceof BooleanType) {
if (((BooleanType) e).hasValue()) {
x.addText(name);
x.addText(": ");
x.addText(((BooleanType) e).getValueAsString());
return true;
}
} else if (e instanceof CodeableReference) {
if (((CodeableReference) e).hasReference()) {
Reference r = ((CodeableReference) e).getReference();
renderReference(res, x, r, allowLinks);
} else {
renderCodeableConcept(x, ((CodeableReference) e).getConcept(), showCodeDetails);
}
return true;
} else if (e instanceof CodeableConcept) {
renderCodeableConcept(x, (CodeableConcept) e, showCodeDetails);
return true;
} else if (e instanceof Coding) {
renderCoding(x, (Coding) e, showCodeDetails);
return true;
} else if (e instanceof Annotation) {
renderAnnotation(x, (Annotation) e, showCodeDetails);
return true;
} else if (e instanceof org.hl7.fhir.r4b.model.IntegerType) {
x.addText(Integer.toString(((org.hl7.fhir.r4b.model.IntegerType) e).getValue()));
return true;
} else if (e instanceof org.hl7.fhir.r4b.model.DecimalType) {
x.addText(((org.hl7.fhir.r4b.model.DecimalType) e).getValue().toString());
return true;
} else if (e instanceof Identifier) {
renderIdentifier(x, (Identifier) e);
return true;
} else if (e instanceof HumanName) {
renderHumanName(x, (HumanName) e);
return true;
} else if (e instanceof SampledData) {
renderSampledData(x, (SampledData) e);
return true;
} else if (e instanceof Address) {
renderAddress(x, (Address) e);
return true;
} else if (e instanceof ContactPoint) {
if (allowLinks) {
renderContactPoint(x, (ContactPoint) e);
} else {
displayContactPoint(x, (ContactPoint) e);
}
return true;
} else if (e instanceof Timing) {
renderTiming(x, (Timing) e);
return true;
} else if (e instanceof Quantity) {
renderQuantity(x, (Quantity) e, showCodeDetails);
return true;
} else if (e instanceof Ratio) {
renderQuantity(x, ((Ratio) e).getNumerator(), showCodeDetails);
x.tx("/");
renderQuantity(x, ((Ratio) e).getDenominator(), showCodeDetails);
return true;
} else if (e instanceof Period) {
Period p = (Period) e;
x.addText(name + ": ");
x.addText(!p.hasStart() ? "?ngen-2?" : p.getStartElement().toHumanDisplay());
x.tx(" --> ");
x.addText(!p.hasEnd() ? "(ongoing)" : p.getEndElement().toHumanDisplay());
return true;
} else if (e instanceof Reference) {
Reference r = (Reference) e;
if (r.hasDisplayElement())
x.addText(r.getDisplay());
else if (r.hasReferenceElement()) {
ResourceWithReference tr = resolveReference(res, r.getReference());
// getDisplayForReference(tr.getReference()));
x.addText(tr == null ? r.getReference() : "?ngen-3");
} else
x.tx("?ngen-4?");
return true;
} else if (e instanceof Narrative) {
return false;
} else if (e instanceof Resource) {
return false;
} else if (e instanceof ContactDetail) {
ContactDetail cd = (ContactDetail) e;
if (cd.hasName()) {
x.tx(cd.getName() + ": ");
}
boolean first = true;
for (ContactPoint c : cd.getTelecom()) {
if (first)
first = false;
else
x.tx(",");
if (allowLinks) {
renderContactPoint(x, c);
} else {
displayContactPoint(x, c);
}
}
return true;
} else if (e instanceof Range) {
return false;
} else if (e instanceof Meta) {
return false;
} else if (e instanceof Dosage) {
return false;
} else if (e instanceof Signature) {
return false;
} else if (e instanceof UsageContext) {
return false;
} else if (e instanceof RelatedArtifact) {
return false;
} else if (e instanceof ElementDefinition) {
return false;
} else if (e instanceof Base64BinaryType) {
return false;
} else if (!(e instanceof Attachment))
throw new NotImplementedException("type " + e.getClass().getName() + " not handled yet");
return false;
}
Aggregations