use of org.hl7.fhir.utilities.validation.ValidationMessage.Source in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeDeviceComponent.
protected void composeDeviceComponent(Complex parent, String parentType, String name, DeviceComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "DeviceComponent", name, element, index);
if (element.hasType())
composeCodeableConcept(t, "DeviceComponent", "type", element.getType(), -1);
if (element.hasIdentifier())
composeIdentifier(t, "DeviceComponent", "identifier", element.getIdentifier(), -1);
if (element.hasLastSystemChangeElement())
composeInstant(t, "DeviceComponent", "lastSystemChange", element.getLastSystemChangeElement(), -1);
if (element.hasSource())
composeReference(t, "DeviceComponent", "source", element.getSource(), -1);
if (element.hasParent())
composeReference(t, "DeviceComponent", "parent", element.getParent(), -1);
for (int i = 0; i < element.getOperationalStatus().size(); i++) composeCodeableConcept(t, "DeviceComponent", "operationalStatus", element.getOperationalStatus().get(i), i);
if (element.hasParameterGroup())
composeCodeableConcept(t, "DeviceComponent", "parameterGroup", element.getParameterGroup(), -1);
if (element.hasMeasurementPrincipleElement())
composeEnum(t, "DeviceComponent", "measurementPrinciple", element.getMeasurementPrincipleElement(), -1);
for (int i = 0; i < element.getProductionSpecification().size(); i++) composeDeviceComponentDeviceComponentProductionSpecificationComponent(t, "DeviceComponent", "productionSpecification", element.getProductionSpecification().get(i), i);
if (element.hasLanguageCode())
composeCodeableConcept(t, "DeviceComponent", "languageCode", element.getLanguageCode(), -1);
}
use of org.hl7.fhir.utilities.validation.ValidationMessage.Source in project org.hl7.fhir.core by hapifhir.
the class ConceptMap method setProperty.
@Override
public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url"))
// UriType
this.url = castToUri(value);
else if (name.equals("identifier"))
// Identifier
this.identifier = castToIdentifier(value);
else if (name.equals("version"))
// StringType
this.version = castToString(value);
else if (name.equals("name"))
// StringType
this.name = castToString(value);
else if (name.equals("status"))
// Enumeration<ConformanceResourceStatus>
this.status = new ConformanceResourceStatusEnumFactory().fromType(value);
else if (name.equals("experimental"))
// BooleanType
this.experimental = castToBoolean(value);
else if (name.equals("publisher"))
// StringType
this.publisher = castToString(value);
else if (name.equals("contact"))
this.getContact().add((ConceptMapContactComponent) value);
else if (name.equals("date"))
// DateTimeType
this.date = castToDateTime(value);
else if (name.equals("description"))
// StringType
this.description = castToString(value);
else if (name.equals("useContext"))
this.getUseContext().add(castToCodeableConcept(value));
else if (name.equals("requirements"))
// StringType
this.requirements = castToString(value);
else if (name.equals("copyright"))
// StringType
this.copyright = castToString(value);
else if (name.equals("source[x]"))
// Type
this.source = (Type) value;
else if (name.equals("target[x]"))
// Type
this.target = (Type) value;
else if (name.equals("element"))
this.getElement().add((SourceElementComponent) value);
else
super.setProperty(name, value);
}
use of org.hl7.fhir.utilities.validation.ValidationMessage.Source in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeElementDefinitionElementDefinitionConstraintComponent.
protected void composeElementDefinitionElementDefinitionConstraintComponent(Complex parent, String parentType, String name, ElementDefinition.ElementDefinitionConstraintComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeElement(t, "constraint", name, element, index);
if (element.hasKeyElement())
composeId(t, "ElementDefinition", "key", element.getKeyElement(), -1);
if (element.hasRequirementsElement())
composeString(t, "ElementDefinition", "requirements", element.getRequirementsElement(), -1);
if (element.hasSeverityElement())
composeEnum(t, "ElementDefinition", "severity", element.getSeverityElement(), -1);
if (element.hasHumanElement())
composeString(t, "ElementDefinition", "human", element.getHumanElement(), -1);
if (element.hasExpressionElement())
composeString(t, "ElementDefinition", "expression", element.getExpressionElement(), -1);
if (element.hasXpathElement())
composeString(t, "ElementDefinition", "xpath", element.getXpathElement(), -1);
if (element.hasSourceElement())
composeUri(t, "ElementDefinition", "source", element.getSourceElement(), -1);
}
use of org.hl7.fhir.utilities.validation.ValidationMessage.Source in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImplementationGuideImplementationGuidePageComponent.
protected void composeImplementationGuideImplementationGuidePageComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuidePageComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "page", name, element, index);
if (element.hasSourceElement())
composeUri(t, "ImplementationGuide", "source", element.getSourceElement(), -1);
if (element.hasTitleElement())
composeString(t, "ImplementationGuide", "title", element.getTitleElement(), -1);
if (element.hasKindElement())
composeEnum(t, "ImplementationGuide", "kind", element.getKindElement(), -1);
for (int i = 0; i < element.getType().size(); i++) composeCode(t, "ImplementationGuide", "type", element.getType().get(i), i);
for (int i = 0; i < element.getPackage().size(); i++) composeString(t, "ImplementationGuide", "package", element.getPackage().get(i), i);
if (element.hasFormatElement())
composeCode(t, "ImplementationGuide", "format", element.getFormatElement(), -1);
for (int i = 0; i < element.getPage().size(); i++) composeImplementationGuideImplementationGuidePageComponent(t, "ImplementationGuide", "page", element.getPage().get(i), i);
}
use of org.hl7.fhir.utilities.validation.ValidationMessage.Source in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeDeviceUseStatement.
protected void composeDeviceUseStatement(Complex parent, String parentType, String name, DeviceUseStatement element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "DeviceUseStatement", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "DeviceUseStatement", "identifier", element.getIdentifier().get(i), i);
if (element.hasStatusElement())
composeEnum(t, "DeviceUseStatement", "status", element.getStatusElement(), -1);
if (element.hasSubject())
composeReference(t, "DeviceUseStatement", "subject", element.getSubject(), -1);
if (element.hasWhenUsed())
composePeriod(t, "DeviceUseStatement", "whenUsed", element.getWhenUsed(), -1);
if (element.hasTiming())
composeType(t, "DeviceUseStatement", "timing", element.getTiming(), -1);
if (element.hasRecordedOnElement())
composeDateTime(t, "DeviceUseStatement", "recordedOn", element.getRecordedOnElement(), -1);
if (element.hasSource())
composeReference(t, "DeviceUseStatement", "source", element.getSource(), -1);
if (element.hasDevice())
composeReference(t, "DeviceUseStatement", "device", element.getDevice(), -1);
for (int i = 0; i < element.getIndication().size(); i++) composeCodeableConcept(t, "DeviceUseStatement", "indication", element.getIndication().get(i), i);
if (element.hasBodySite())
composeCodeableConcept(t, "DeviceUseStatement", "bodySite", element.getBodySite(), -1);
for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "DeviceUseStatement", "note", element.getNote().get(i), i);
}
Aggregations