use of org.hl7.fhir.r5.model.CanonicalType in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeCanonical.
protected void composeCanonical(Complex parent, String parentType, String name, CanonicalType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:" + parentType + "." + name);
t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
composeElement(t, parentType, name, value, index);
}
use of org.hl7.fhir.r5.model.CanonicalType in project org.hl7.fhir.core by hapifhir.
the class XLSXWriter method canonicalList.
private String canonicalList(List<CanonicalType> list) {
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder("|");
for (CanonicalType c : list) {
String v = c.getValue();
if (v.startsWith("http://hl7.org/fhir/StructureDefinition/"))
v = v.substring(40);
b.append(v);
}
return b.toString();
}
use of org.hl7.fhir.r5.model.CanonicalType in project org.hl7.fhir.core by hapifhir.
the class QuestionnaireBuilder method addReferenceQuestions.
// Special Types ---------------------------------------------------------------
private void addReferenceQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<CanonicalType> profileURL, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException {
// var
// rn : String;
// i : integer;
// q : TFhirQuestionnaireGroupQuestion;
ToolingExtensions.addFhirType(group, "Reference");
QuestionnaireItemComponent q = addQuestion(group, QuestionnaireItemType.REFERENCE, path, "value", group.getText(), answerGroups);
group.setText(null);
CommaSeparatedStringBuilder rn = new CommaSeparatedStringBuilder();
for (UriType u : profileURL) if (u.getValue().startsWith("http://hl7.org/fhir/StructureDefinition/"))
rn.append(u.getValue().substring(40));
if (rn.length() == 0)
ToolingExtensions.addReferenceFilter(q, "subject=$subj&patient=$subj&encounter=$encounter");
else {
ToolingExtensions.addAllowedResource(q, rn.toString());
ToolingExtensions.addReferenceFilter(q, "subject=$subj&patient=$subj&encounter=$encounter");
}
for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null);
}
use of org.hl7.fhir.r5.model.CanonicalType in project org.hl7.fhir.core by hapifhir.
the class ConceptMap30_50 method convertUriAndVersionToCanonical.
private static CanonicalType convertUriAndVersionToCanonical(org.hl7.fhir.dstu3.model.UriType srcUri, org.hl7.fhir.dstu3.model.StringType srcVersion) {
if (srcUri == null && srcVersion == null)
return null;
org.hl7.fhir.r5.model.CanonicalType tgt = new org.hl7.fhir.r5.model.CanonicalType();
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(srcUri == null ? srcVersion : srcUri, tgt);
if (srcUri.hasValue()) {
if (srcVersion.hasValue()) {
tgt.setValue(srcUri.getValue() + "|" + srcVersion.getValue());
} else {
tgt.setValue(srcUri.getValue());
}
}
return tgt;
}
use of org.hl7.fhir.r5.model.CanonicalType in project org.hl7.fhir.core by hapifhir.
the class XLSXWriter method canonicalList.
private String canonicalList(List<CanonicalType> list) {
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder("|");
for (CanonicalType c : list) {
String v = c.getValue();
if (v.startsWith("http://hl7.org/fhir/StructureDefinition/"))
v = v.substring(40);
b.append(v);
}
return b.toString();
}
Aggregations