use of org.hl7.fhir.r4.model.Duration in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeVisionPrescriptionVisionPrescriptionDispenseComponent.
protected void composeVisionPrescriptionVisionPrescriptionDispenseComponent(Complex parent, String parentType, String name, VisionPrescription.VisionPrescriptionDispenseComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "dispense", name, element, index);
if (element.hasProduct())
composeCoding(t, "VisionPrescription", "product", element.getProduct(), -1);
if (element.hasEyeElement())
composeEnum(t, "VisionPrescription", "eye", element.getEyeElement(), -1);
if (element.hasSphereElement())
composeDecimal(t, "VisionPrescription", "sphere", element.getSphereElement(), -1);
if (element.hasCylinderElement())
composeDecimal(t, "VisionPrescription", "cylinder", element.getCylinderElement(), -1);
if (element.hasAxisElement())
composeInteger(t, "VisionPrescription", "axis", element.getAxisElement(), -1);
if (element.hasPrismElement())
composeDecimal(t, "VisionPrescription", "prism", element.getPrismElement(), -1);
if (element.hasBaseElement())
composeEnum(t, "VisionPrescription", "base", element.getBaseElement(), -1);
if (element.hasAddElement())
composeDecimal(t, "VisionPrescription", "add", element.getAddElement(), -1);
if (element.hasPowerElement())
composeDecimal(t, "VisionPrescription", "power", element.getPowerElement(), -1);
if (element.hasBackCurveElement())
composeDecimal(t, "VisionPrescription", "backCurve", element.getBackCurveElement(), -1);
if (element.hasDiameterElement())
composeDecimal(t, "VisionPrescription", "diameter", element.getDiameterElement(), -1);
if (element.hasDuration())
composeQuantity(t, "VisionPrescription", "duration", element.getDuration(), -1);
if (element.hasColorElement())
composeString(t, "VisionPrescription", "color", element.getColorElement(), -1);
if (element.hasBrandElement())
composeString(t, "VisionPrescription", "brand", element.getBrandElement(), -1);
if (element.hasNotesElement())
composeString(t, "VisionPrescription", "notes", element.getNotesElement(), -1);
}
use of org.hl7.fhir.r4.model.Duration in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeImagingExcerptStudyViewableComponent.
protected void composeImagingExcerptStudyViewableComponent(Complex parent, String parentType, String name, ImagingExcerpt.StudyViewableComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "viewable", name, element, index);
if (element.hasContentTypeElement())
composeCode(t, "ImagingExcerpt", "contentType", element.getContentTypeElement(), -1);
if (element.hasHeightElement())
composePositiveInt(t, "ImagingExcerpt", "height", element.getHeightElement(), -1);
if (element.hasWidthElement())
composePositiveInt(t, "ImagingExcerpt", "width", element.getWidthElement(), -1);
if (element.hasFramesElement())
composePositiveInt(t, "ImagingExcerpt", "frames", element.getFramesElement(), -1);
if (element.hasDurationElement())
composeUnsignedInt(t, "ImagingExcerpt", "duration", element.getDurationElement(), -1);
if (element.hasSizeElement())
composeUnsignedInt(t, "ImagingExcerpt", "size", element.getSizeElement(), -1);
if (element.hasTitleElement())
composeString(t, "ImagingExcerpt", "title", element.getTitleElement(), -1);
if (element.hasUrlElement())
composeUri(t, "ImagingExcerpt", "url", element.getUrlElement(), -1);
}
use of org.hl7.fhir.r4.model.Duration in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeDuration.
protected void composeDuration(Complex parent, String parentType, String name, Duration element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeElement(t, "Duration", name, element, index);
}
use of org.hl7.fhir.r4.model.Duration in project org.hl7.fhir.core by hapifhir.
the class JsonParser method composeType.
protected void composeType(String prefix, Type type) throws IOException {
if (type == null)
;
else if (type instanceof Age)
composeAge(prefix + "Age", (Age) type);
else if (type instanceof Count)
composeCount(prefix + "Count", (Count) type);
else if (type instanceof Money)
composeMoney(prefix + "Money", (Money) type);
else if (type instanceof Distance)
composeDistance(prefix + "Distance", (Distance) type);
else if (type instanceof Duration)
composeDuration(prefix + "Duration", (Duration) type);
else if (type instanceof SimpleQuantity)
composeSimpleQuantity(prefix + "SimpleQuantity", (SimpleQuantity) type);
else if (type instanceof Period)
composePeriod(prefix + "Period", (Period) type);
else if (type instanceof Coding)
composeCoding(prefix + "Coding", (Coding) type);
else if (type instanceof Range)
composeRange(prefix + "Range", (Range) type);
else if (type instanceof Quantity)
composeQuantity(prefix + "Quantity", (Quantity) type);
else if (type instanceof Attachment)
composeAttachment(prefix + "Attachment", (Attachment) type);
else if (type instanceof Ratio)
composeRatio(prefix + "Ratio", (Ratio) type);
else if (type instanceof Annotation)
composeAnnotation(prefix + "Annotation", (Annotation) type);
else if (type instanceof SampledData)
composeSampledData(prefix + "SampledData", (SampledData) type);
else if (type instanceof Reference)
composeReference(prefix + "Reference", (Reference) type);
else if (type instanceof CodeableConcept)
composeCodeableConcept(prefix + "CodeableConcept", (CodeableConcept) type);
else if (type instanceof Identifier)
composeIdentifier(prefix + "Identifier", (Identifier) type);
else if (type instanceof Signature)
composeSignature(prefix + "Signature", (Signature) type);
else if (type instanceof TriggerDefinition)
composeTriggerDefinition(prefix + "TriggerDefinition", (TriggerDefinition) type);
else if (type instanceof ElementDefinition)
composeElementDefinition(prefix + "ElementDefinition", (ElementDefinition) type);
else if (type instanceof Timing)
composeTiming(prefix + "Timing", (Timing) type);
else if (type instanceof ModuleMetadata)
composeModuleMetadata(prefix + "ModuleMetadata", (ModuleMetadata) type);
else if (type instanceof ActionDefinition)
composeActionDefinition(prefix + "ActionDefinition", (ActionDefinition) type);
else if (type instanceof Address)
composeAddress(prefix + "Address", (Address) type);
else if (type instanceof HumanName)
composeHumanName(prefix + "HumanName", (HumanName) type);
else if (type instanceof DataRequirement)
composeDataRequirement(prefix + "DataRequirement", (DataRequirement) type);
else if (type instanceof Meta)
composeMeta(prefix + "Meta", (Meta) type);
else if (type instanceof ParameterDefinition)
composeParameterDefinition(prefix + "ParameterDefinition", (ParameterDefinition) type);
else if (type instanceof ContactPoint)
composeContactPoint(prefix + "ContactPoint", (ContactPoint) type);
else if (type instanceof MarkdownType) {
composeMarkdownCore(prefix + "Markdown", (MarkdownType) type, false);
composeMarkdownExtras(prefix + "Markdown", (MarkdownType) type, false);
} else if (type instanceof UnsignedIntType) {
composeUnsignedIntCore(prefix + "UnsignedInt", (UnsignedIntType) type, false);
composeUnsignedIntExtras(prefix + "UnsignedInt", (UnsignedIntType) type, false);
} else if (type instanceof CodeType) {
composeCodeCore(prefix + "Code", (CodeType) type, false);
composeCodeExtras(prefix + "Code", (CodeType) type, false);
} else if (type instanceof IdType) {
composeIdCore(prefix + "Id", (IdType) type, false);
composeIdExtras(prefix + "Id", (IdType) type, false);
} else if (type instanceof OidType) {
composeOidCore(prefix + "Oid", (OidType) type, false);
composeOidExtras(prefix + "Oid", (OidType) type, false);
} else if (type instanceof PositiveIntType) {
composePositiveIntCore(prefix + "PositiveInt", (PositiveIntType) type, false);
composePositiveIntExtras(prefix + "PositiveInt", (PositiveIntType) type, false);
} else if (type instanceof UuidType) {
composeUuidCore(prefix + "Uuid", (UuidType) type, false);
composeUuidExtras(prefix + "Uuid", (UuidType) type, false);
} else if (type instanceof IntegerType) {
composeIntegerCore(prefix + "Integer", (IntegerType) type, false);
composeIntegerExtras(prefix + "Integer", (IntegerType) type, false);
} else if (type instanceof DateTimeType) {
composeDateTimeCore(prefix + "DateTime", (DateTimeType) type, false);
composeDateTimeExtras(prefix + "DateTime", (DateTimeType) type, false);
} else if (type instanceof DateType) {
composeDateCore(prefix + "Date", (DateType) type, false);
composeDateExtras(prefix + "Date", (DateType) type, false);
} else if (type instanceof DecimalType) {
composeDecimalCore(prefix + "Decimal", (DecimalType) type, false);
composeDecimalExtras(prefix + "Decimal", (DecimalType) type, false);
} else if (type instanceof UriType) {
composeUriCore(prefix + "Uri", (UriType) type, false);
composeUriExtras(prefix + "Uri", (UriType) type, false);
} else if (type instanceof Base64BinaryType) {
composeBase64BinaryCore(prefix + "Base64Binary", (Base64BinaryType) type, false);
composeBase64BinaryExtras(prefix + "Base64Binary", (Base64BinaryType) type, false);
} else if (type instanceof TimeType) {
composeTimeCore(prefix + "Time", (TimeType) type, false);
composeTimeExtras(prefix + "Time", (TimeType) type, false);
} else if (type instanceof StringType) {
composeStringCore(prefix + "String", (StringType) type, false);
composeStringExtras(prefix + "String", (StringType) type, false);
} else if (type instanceof BooleanType) {
composeBooleanCore(prefix + "Boolean", (BooleanType) type, false);
composeBooleanExtras(prefix + "Boolean", (BooleanType) type, false);
} else if (type instanceof InstantType) {
composeInstantCore(prefix + "Instant", (InstantType) type, false);
composeInstantExtras(prefix + "Instant", (InstantType) type, false);
} else
throw new Error("Unhandled type");
}
use of org.hl7.fhir.r4.model.Duration in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeTimingTimingRepeatComponent.
protected void composeTimingTimingRepeatComponent(Complex parent, String parentType, String name, Timing.TimingRepeatComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeElement(t, "repeat", name, element, index);
if (element.hasBounds())
composeType(t, "Timing", "bounds", element.getBounds(), -1);
if (element.hasCountElement())
composeInteger(t, "Timing", "count", element.getCountElement(), -1);
if (element.hasCountMaxElement())
composeInteger(t, "Timing", "countMax", element.getCountMaxElement(), -1);
if (element.hasDurationElement())
composeDecimal(t, "Timing", "duration", element.getDurationElement(), -1);
if (element.hasDurationMaxElement())
composeDecimal(t, "Timing", "durationMax", element.getDurationMaxElement(), -1);
if (element.hasDurationUnitElement())
composeEnum(t, "Timing", "durationUnit", element.getDurationUnitElement(), -1);
if (element.hasFrequencyElement())
composeInteger(t, "Timing", "frequency", element.getFrequencyElement(), -1);
if (element.hasFrequencyMaxElement())
composeInteger(t, "Timing", "frequencyMax", element.getFrequencyMaxElement(), -1);
if (element.hasPeriodElement())
composeDecimal(t, "Timing", "period", element.getPeriodElement(), -1);
if (element.hasPeriodMaxElement())
composeDecimal(t, "Timing", "periodMax", element.getPeriodMaxElement(), -1);
if (element.hasPeriodUnitElement())
composeEnum(t, "Timing", "periodUnit", element.getPeriodUnitElement(), -1);
if (element.hasWhenElement())
composeEnum(t, "Timing", "when", element.getWhenElement(), -1);
if (element.hasOffsetElement())
composeUnsignedInt(t, "Timing", "offset", element.getOffsetElement(), -1);
}
Aggregations