mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-10 06:44:44 +00:00
test generated code
This commit is contained in:
parent
54d239a38a
commit
c7f747519c
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class AuthorizationIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-authorization-identifier|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public AuthorizationIdentifier() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static AuthorizationIdentifier fromSource(PEInstance source) {
|
||||
AuthorizationIdentifier theThing = new AuthorizationIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "https://autregweb.sst.dk";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public AuthorizationIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public AuthorizationIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public AuthorizationIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class CVRIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-cvr-identifier|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public CVRIdentifier() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static CVRIdentifier fromSource(PEInstance source) {
|
||||
CVRIdentifier theThing = new CVRIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "http://cvr.dk";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public CVRIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public CVRIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public CVRIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Extension for the last date a Condition-instance was confirmed valid in its
|
||||
* current state. E.g. with its current clinical- and verification status, stage
|
||||
* and severity. Typically the last performed follow-up
|
||||
*
|
||||
*/
|
||||
public class ConditionLastAssertedDate extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/ConditionLastAssertedDate|3.2.0";
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public ConditionLastAssertedDate() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static ConditionLastAssertedDate fromSource(PEInstance source) {
|
||||
ConditionLastAssertedDate theThing = new ConditionLastAssertedDate();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,943 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public class DkCoreBasicObservation extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-basic-observation|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("")
|
||||
private String id; //
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extensions that cannot be ignored")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).")
|
||||
private List<Extension> modifierExtensions = new ArrayList<>(); // Extensions that cannot be ignored
|
||||
|
||||
@Min("0") @Max("*") @Doco("Business Identifier for observation")
|
||||
@Definition("A unique identifier assigned to this observation.")
|
||||
private List<Identifier> identifiers = new ArrayList<>(); // Business Identifier for observation
|
||||
|
||||
@Min("0") @Max("*") @Doco("Fulfills plan, proposal or order")
|
||||
@Definition("A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.")
|
||||
private List<Reference> basedOns = new ArrayList<>(); // Fulfills plan, proposal or order
|
||||
|
||||
@Min("0") @Max("*") @Doco("Part of referenced event")
|
||||
@Definition("A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.")
|
||||
private List<Reference> partOfs = new ArrayList<>(); // Part of referenced event
|
||||
|
||||
@Min("1") @Max("1") @Doco("registered | preliminary | final | amended +")
|
||||
@BindingStrength("required") @ValueSet("http://hl7.org/fhir/ValueSet/observation-status|4.0.1")
|
||||
@Definition("The status of the result value.")
|
||||
private String status;// @NotNull // registered | preliminary | final | amended +
|
||||
|
||||
@Min("1") @Max("1") @Doco("Classification of type of observation")
|
||||
@BindingStrength("preferred") @ValueSet("http://hl7.org/fhir/ValueSet/observation-category")
|
||||
@Definition("A code that classifies the general type of observation being made.")
|
||||
private CodeableConcept category;// @NotNull // Classification of type of observation
|
||||
|
||||
@Min("1") @Max("1") @Doco("Type of observation (code / type)")
|
||||
@BindingStrength("example") @ValueSet("http://hl7.org/fhir/ValueSet/observation-codes")
|
||||
@Definition("Describes what was observed. Sometimes this is called the observation \"name\".")
|
||||
private CodeableConcept code;// @NotNull // Type of observation (code / type)
|
||||
|
||||
@Min("1") @Max("1") @Doco("Who and/or what the observation is about")
|
||||
@Definition("The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.")
|
||||
private Reference subject;// @NotNull // Who and/or what the observation is about
|
||||
|
||||
@Min("0") @Max("*") @Doco("What the observation is about, when it is not about the subject of record")
|
||||
@Definition("The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.")
|
||||
private List<Reference> focus = new ArrayList<>(); // What the observation is about, when it is not about the subject of record
|
||||
|
||||
@Min("0") @Max("1") @Doco("Healthcare event during which this observation is made")
|
||||
@Definition("The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.")
|
||||
private Reference encounter; // Healthcare event during which this observation is made
|
||||
|
||||
@Min("0") @Max("*") @Doco("Who is responsible for the observation")
|
||||
@Definition("Who was responsible for asserting the observed value as \"true\".")
|
||||
private List<Reference> performers = new ArrayList<>(); // Who is responsible for the observation
|
||||
|
||||
@Min("0") @Max("1") @Doco("Actual result")
|
||||
@Definition("The information determined as a result of making the observation, if the information has a simple value.")
|
||||
private Quantity value; // Actual result
|
||||
|
||||
@Min("0") @Max("1") @Doco("Why the result is missing")
|
||||
@BindingStrength("extensible") @ValueSet("http://hl7.org/fhir/ValueSet/data-absent-reason")
|
||||
@Definition("Provides a reason why the expected value in the element Observation.value[x] is missing.")
|
||||
private CodeableConcept dataAbsentReason; // Why the result is missing
|
||||
|
||||
@Min("0") @Max("*") @Doco("Comments about the observation")
|
||||
@Definition("Comments about the observation or the results.")
|
||||
private List<Annotation> notes = new ArrayList<>(); // Comments about the observation
|
||||
|
||||
@Min("0") @Max("1") @Doco("How it was done")
|
||||
@BindingStrength("example") @ValueSet("http://hl7.org/fhir/ValueSet/observation-methods")
|
||||
@Definition("Indicates the mechanism used to perform the observation.")
|
||||
private CodeableConcept method; // How it was done
|
||||
|
||||
@Min("0") @Max("1") @Doco("Specimen used for this observation")
|
||||
@Definition("The specimen that was used when this observation was made.")
|
||||
private Reference specimen; // Specimen used for this observation
|
||||
|
||||
@Min("0") @Max("1") @Doco("The device used for the measurement. It is recommended that when information about the device is sent, it is contained in the same Bundle as the Observation the device measured.")
|
||||
@Definition("The device used to generate the observation data.")
|
||||
private Reference device; // The device used for the measurement. It is recommended that when information about the device is sent, it is contained in the same Bundle as the Observation the device measured.
|
||||
|
||||
@Min("0") @Max("*") @Doco("Provides guide for interpretation")
|
||||
@Definition("Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an \"OR\". In other words, to represent two distinct target populations, two `referenceRange` elements would be used.")
|
||||
private List<BackboneElement> referenceRanges = new ArrayList<>(); // Provides guide for interpretation
|
||||
|
||||
@Min("0") @Max("*") @Doco("Related resource that belongs to the Observation group")
|
||||
@Definition("This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.")
|
||||
private List<Reference> hasMembers = new ArrayList<>(); // Related resource that belongs to the Observation group
|
||||
|
||||
@Min("0") @Max("*") @Doco("Related measurements the observation is made from")
|
||||
@Definition("The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.")
|
||||
private List<Reference> derivedFroms = new ArrayList<>(); // Related measurements the observation is made from
|
||||
|
||||
@Min("0") @Max("*") @Doco("Component results")
|
||||
@Definition("Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.")
|
||||
private List<BackboneElement> components = new ArrayList<>(); // Component results
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreBasicObservation() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of the object, and fill out all the fixed values
|
||||
*
|
||||
*/
|
||||
public DkCoreBasicObservation(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, builder.createResource(CANONICAL_URL, false));
|
||||
load(src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public static DkCoreBasicObservation fromSource(IWorkerContext context, Observation source) {
|
||||
DkCoreBasicObservation theThing = new DkCoreBasicObservation();
|
||||
theThing.workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, source);
|
||||
theThing.load(src);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("id")) {
|
||||
id = ((IdType) src.child("id").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("modifierExtension")) {
|
||||
modifierExtensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("identifier")) {
|
||||
identifiers.add((Identifier) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("basedOn")) {
|
||||
basedOns.add((Reference) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("partOf")) {
|
||||
partOfs.add((Reference) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("status")) {
|
||||
status = src.child("status").asDataType().primitiveValue();
|
||||
}
|
||||
if (src.hasChild("category")) {
|
||||
category = (CodeableConcept) src.child("category").asDataType();
|
||||
}
|
||||
if (src.hasChild("code")) {
|
||||
code = (CodeableConcept) src.child("code").asDataType();
|
||||
}
|
||||
if (src.hasChild("subject")) {
|
||||
subject = (Reference) src.child("subject").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("focus")) {
|
||||
focus.add((Reference) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("encounter")) {
|
||||
encounter = (Reference) src.child("encounter").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("performer")) {
|
||||
performers.add((Reference) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = (Quantity) src.child("value").asDataType();
|
||||
}
|
||||
if (src.hasChild("dataAbsentReason")) {
|
||||
dataAbsentReason = (CodeableConcept) src.child("dataAbsentReason").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("note")) {
|
||||
notes.add((Annotation) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("method")) {
|
||||
method = (CodeableConcept) src.child("method").asDataType();
|
||||
}
|
||||
if (src.hasChild("specimen")) {
|
||||
specimen = (Reference) src.child("specimen").asDataType();
|
||||
}
|
||||
if (src.hasChild("device")) {
|
||||
device = (Reference) src.child("device").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("referenceRange")) {
|
||||
referenceRanges.add((BackboneElement) item.asElement());
|
||||
}
|
||||
for (PEInstance item : src.children("hasMember")) {
|
||||
hasMembers.add((Reference) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("derivedFrom")) {
|
||||
derivedFroms.add((Reference) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("component")) {
|
||||
components.add((BackboneElement) item.asElement());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public Observation build(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
Observation theThing = new Observation();
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, theThing);
|
||||
save(tgt, false);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this profile class into an existing resource (overwriting anything that
|
||||
* exists in the profile)
|
||||
*
|
||||
*/
|
||||
public void save(IWorkerContext context, Observation dest, boolean nulls) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, dest);
|
||||
save(tgt, nulls);
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("id");
|
||||
if (id != null) {
|
||||
tgt.makeChild("id").data().setProperty("value", new IdType(id));
|
||||
}
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("modifierExtension");
|
||||
for (Extension item : modifierExtensions) {
|
||||
tgt.addChild("modifierExtension", item);
|
||||
}
|
||||
tgt.clear("identifier");
|
||||
for (Identifier item : identifiers) {
|
||||
tgt.addChild("identifier", item);
|
||||
}
|
||||
tgt.clear("basedOn");
|
||||
for (Reference item : basedOns) {
|
||||
tgt.addChild("basedOn", item);
|
||||
}
|
||||
tgt.clear("partOf");
|
||||
for (Reference item : partOfs) {
|
||||
tgt.addChild("partOf", item);
|
||||
}
|
||||
tgt.clear("status");
|
||||
if (status != null) {
|
||||
tgt.makeChild("status").data().setProperty("value", new CodeType(status));
|
||||
}
|
||||
tgt.clear("category");
|
||||
if (category != null) {
|
||||
tgt.addChild("category", category);
|
||||
}
|
||||
tgt.clear("code");
|
||||
if (code != null) {
|
||||
tgt.addChild("code", code);
|
||||
}
|
||||
tgt.clear("subject");
|
||||
if (subject != null) {
|
||||
tgt.addChild("subject", subject);
|
||||
}
|
||||
tgt.clear("focus");
|
||||
for (Reference item : focus) {
|
||||
tgt.addChild("focus", item);
|
||||
}
|
||||
tgt.clear("encounter");
|
||||
if (encounter != null) {
|
||||
tgt.addChild("encounter", encounter);
|
||||
}
|
||||
tgt.clear("performer");
|
||||
for (Reference item : performers) {
|
||||
tgt.addChild("performer", item);
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.addChild("value", value);
|
||||
}
|
||||
tgt.clear("dataAbsentReason");
|
||||
if (dataAbsentReason != null) {
|
||||
tgt.addChild("dataAbsentReason", dataAbsentReason);
|
||||
}
|
||||
tgt.clear("note");
|
||||
for (Annotation item : notes) {
|
||||
tgt.addChild("note", item);
|
||||
}
|
||||
tgt.clear("method");
|
||||
if (method != null) {
|
||||
tgt.addChild("method", method);
|
||||
}
|
||||
tgt.clear("specimen");
|
||||
if (specimen != null) {
|
||||
tgt.addChild("specimen", specimen);
|
||||
}
|
||||
tgt.clear("device");
|
||||
if (device != null) {
|
||||
tgt.addChild("device", device);
|
||||
}
|
||||
tgt.clear("referenceRange");
|
||||
for (BackboneElement item : referenceRanges) {
|
||||
tgt.addChild("referenceRange", item);
|
||||
}
|
||||
tgt.clear("hasMember");
|
||||
for (Reference item : hasMembers) {
|
||||
tgt.addChild("hasMember", item);
|
||||
}
|
||||
tgt.clear("derivedFrom");
|
||||
for (Reference item : derivedFroms) {
|
||||
tgt.addChild("derivedFrom", item);
|
||||
}
|
||||
tgt.clear("component");
|
||||
for (BackboneElement item : components) {
|
||||
tgt.addChild("component", item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setId(String value) {
|
||||
this.id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasId() {
|
||||
return id != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getModifierExtensions() {
|
||||
if (modifierExtensions == null) { modifierExtensions = new ArrayList<>(); }
|
||||
return modifierExtensions;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtensions() {
|
||||
return modifierExtensions != null && !modifierExtensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addModifierExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getModifierExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtension(Extension item) {
|
||||
return hasModifierExtensions() && modifierExtensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeModifierExtension(Extension item) {
|
||||
if (hasModifierExtension(item)) {
|
||||
modifierExtensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Identifier> getIdentifiers() {
|
||||
if (identifiers == null) { identifiers = new ArrayList<>(); }
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public boolean hasIdentifiers() {
|
||||
return identifiers != null && !identifiers.isEmpty();
|
||||
}
|
||||
|
||||
public Identifier addIdentifier() {
|
||||
Identifier theThing = new Identifier();
|
||||
getIdentifiers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasIdentifier(Identifier item) {
|
||||
return hasIdentifiers() && identifiers.contains(item);
|
||||
}
|
||||
|
||||
public void removeIdentifier(Identifier item) {
|
||||
if (hasIdentifier(item)) {
|
||||
identifiers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getBasedOns() {
|
||||
if (basedOns == null) { basedOns = new ArrayList<>(); }
|
||||
return basedOns;
|
||||
}
|
||||
|
||||
public boolean hasBasedOns() {
|
||||
return basedOns != null && !basedOns.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addBasedOn() {
|
||||
Reference theThing = new Reference();
|
||||
getBasedOns().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasBasedOn(Reference item) {
|
||||
return hasBasedOns() && basedOns.contains(item);
|
||||
}
|
||||
|
||||
public void removeBasedOn(Reference item) {
|
||||
if (hasBasedOn(item)) {
|
||||
basedOns.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getPartOfs() {
|
||||
if (partOfs == null) { partOfs = new ArrayList<>(); }
|
||||
return partOfs;
|
||||
}
|
||||
|
||||
public boolean hasPartOfs() {
|
||||
return partOfs != null && !partOfs.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addPartOf() {
|
||||
Reference theThing = new Reference();
|
||||
getPartOfs().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasPartOf(Reference item) {
|
||||
return hasPartOfs() && partOfs.contains(item);
|
||||
}
|
||||
|
||||
public void removePartOf(Reference item) {
|
||||
if (hasPartOf(item)) {
|
||||
partOfs.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setStatus(String value) {
|
||||
this.status = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasStatus() {
|
||||
return status != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getCategory() {
|
||||
if (category == null) { category = new CodeableConcept(); }
|
||||
return category;
|
||||
}
|
||||
|
||||
public boolean hasCategory() {
|
||||
return category != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getCode() {
|
||||
if (code == null) { code = new CodeableConcept(); }
|
||||
return code;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setCode(CodeableConcept value) {
|
||||
this.code = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasCode() {
|
||||
return code != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getSubject() {
|
||||
if (subject == null) { subject = new Reference(); }
|
||||
return subject;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setSubject(Reference value) {
|
||||
this.subject = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasSubject() {
|
||||
return subject != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getFocus() {
|
||||
if (focus == null) { focus = new ArrayList<>(); }
|
||||
return focus;
|
||||
}
|
||||
|
||||
public boolean hasFocus() {
|
||||
return focus != null && !focus.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addFocus() {
|
||||
Reference theThing = new Reference();
|
||||
getFocus().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasFocus(Reference item) {
|
||||
return hasFocus() && focus.contains(item);
|
||||
}
|
||||
|
||||
public void removeFocus(Reference item) {
|
||||
if (hasFocus(item)) {
|
||||
focus.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getEncounter() {
|
||||
if (encounter == null) { encounter = new Reference(); }
|
||||
return encounter;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setEncounter(Reference value) {
|
||||
this.encounter = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasEncounter() {
|
||||
return encounter != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getPerformers() {
|
||||
if (performers == null) { performers = new ArrayList<>(); }
|
||||
return performers;
|
||||
}
|
||||
|
||||
public boolean hasPerformers() {
|
||||
return performers != null && !performers.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addPerformer() {
|
||||
Reference theThing = new Reference();
|
||||
getPerformers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasPerformer(Reference item) {
|
||||
return hasPerformers() && performers.contains(item);
|
||||
}
|
||||
|
||||
public void removePerformer(Reference item) {
|
||||
if (hasPerformer(item)) {
|
||||
performers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Quantity getValue() {
|
||||
if (value == null) { value = new Quantity(); }
|
||||
return value;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setValue(Quantity value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getDataAbsentReason() {
|
||||
if (dataAbsentReason == null) { dataAbsentReason = new CodeableConcept(); }
|
||||
return dataAbsentReason;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setDataAbsentReason(CodeableConcept value) {
|
||||
this.dataAbsentReason = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasDataAbsentReason() {
|
||||
return dataAbsentReason != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Annotation> getNotes() {
|
||||
if (notes == null) { notes = new ArrayList<>(); }
|
||||
return notes;
|
||||
}
|
||||
|
||||
public boolean hasNotes() {
|
||||
return notes != null && !notes.isEmpty();
|
||||
}
|
||||
|
||||
public Annotation addNote() {
|
||||
Annotation theThing = new Annotation();
|
||||
getNotes().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasNote(Annotation item) {
|
||||
return hasNotes() && notes.contains(item);
|
||||
}
|
||||
|
||||
public void removeNote(Annotation item) {
|
||||
if (hasNote(item)) {
|
||||
notes.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getMethod() {
|
||||
if (method == null) { method = new CodeableConcept(); }
|
||||
return method;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setMethod(CodeableConcept value) {
|
||||
this.method = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasMethod() {
|
||||
return method != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getSpecimen() {
|
||||
if (specimen == null) { specimen = new Reference(); }
|
||||
return specimen;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setSpecimen(Reference value) {
|
||||
this.specimen = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasSpecimen() {
|
||||
return specimen != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getDevice() {
|
||||
if (device == null) { device = new Reference(); }
|
||||
return device;
|
||||
}
|
||||
|
||||
public DkCoreBasicObservation setDevice(Reference value) {
|
||||
this.device = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasDevice() {
|
||||
return device != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getReferenceRanges() {
|
||||
if (referenceRanges == null) { referenceRanges = new ArrayList<>(); }
|
||||
return referenceRanges;
|
||||
}
|
||||
|
||||
public boolean hasReferenceRanges() {
|
||||
return referenceRanges != null && !referenceRanges.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasReferenceRange(BackboneElement item) {
|
||||
return hasReferenceRanges() && referenceRanges.contains(item);
|
||||
}
|
||||
|
||||
public void removeReferenceRange(BackboneElement item) {
|
||||
if (hasReferenceRange(item)) {
|
||||
referenceRanges.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getHasMembers() {
|
||||
if (hasMembers == null) { hasMembers = new ArrayList<>(); }
|
||||
return hasMembers;
|
||||
}
|
||||
|
||||
public boolean hasHasMembers() {
|
||||
return hasMembers != null && !hasMembers.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addHasMember() {
|
||||
Reference theThing = new Reference();
|
||||
getHasMembers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasHasMember(Reference item) {
|
||||
return hasHasMembers() && hasMembers.contains(item);
|
||||
}
|
||||
|
||||
public void removeHasMember(Reference item) {
|
||||
if (hasHasMember(item)) {
|
||||
hasMembers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getDerivedFroms() {
|
||||
if (derivedFroms == null) { derivedFroms = new ArrayList<>(); }
|
||||
return derivedFroms;
|
||||
}
|
||||
|
||||
public boolean hasDerivedFroms() {
|
||||
return derivedFroms != null && !derivedFroms.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addDerivedFrom() {
|
||||
Reference theThing = new Reference();
|
||||
getDerivedFroms().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasDerivedFrom(Reference item) {
|
||||
return hasDerivedFroms() && derivedFroms.contains(item);
|
||||
}
|
||||
|
||||
public void removeDerivedFrom(Reference item) {
|
||||
if (hasDerivedFrom(item)) {
|
||||
derivedFroms.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getComponents() {
|
||||
if (components == null) { components = new ArrayList<>(); }
|
||||
return components;
|
||||
}
|
||||
|
||||
public boolean hasComponents() {
|
||||
return components != null && !components.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasComponent(BackboneElement item) {
|
||||
return hasComponents() && components.contains(item);
|
||||
}
|
||||
|
||||
public void removeComponent(BackboneElement item) {
|
||||
if (hasComponent(item)) {
|
||||
components.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
id = null;
|
||||
extensions.clear();
|
||||
modifierExtensions.clear();
|
||||
identifiers.clear();
|
||||
basedOns.clear();
|
||||
partOfs.clear();
|
||||
status = null;
|
||||
category = null;
|
||||
code = null;
|
||||
subject = null;
|
||||
focus.clear();
|
||||
encounter = null;
|
||||
performers.clear();
|
||||
value = null;
|
||||
dataAbsentReason = null;
|
||||
notes.clear();
|
||||
method = null;
|
||||
specimen = null;
|
||||
device = null;
|
||||
referenceRanges.clear();
|
||||
hasMembers.clear();
|
||||
derivedFroms.clear();
|
||||
components.clear();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,657 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public class DkCoreCondition extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-condition|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("")
|
||||
private String id; //
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extension")
|
||||
@Definition("An Extension")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Extension
|
||||
|
||||
@Min("0") @Max("1") @Doco("Last date a condition was confirmed valid in its current state")
|
||||
@Definition("Extension for the last date a Condition-instance was confirmed valid in its current state. E.g. with its current clinical- and verification status, stage and severity. Typically the last performed follow-up")
|
||||
private Date conditionLastAssertedDate; // Last date a condition was confirmed valid in its current state
|
||||
|
||||
@Min("0") @Max("1") @Doco("Date where a condition lost focus in a specific clinical context")
|
||||
@Definition("Extension for the date where a condition lost focus in a specific clinical context")
|
||||
private Date notFollowedAnymore; // Date where a condition lost focus in a specific clinical context
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extensions that cannot be ignored")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).")
|
||||
private List<Extension> modifierExtensions = new ArrayList<>(); // Extensions that cannot be ignored
|
||||
|
||||
@Min("0") @Max("*") @Doco("External Ids for this condition")
|
||||
@Definition("Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.")
|
||||
private List<Identifier> identifiers = new ArrayList<>(); // External Ids for this condition
|
||||
|
||||
@Min("0") @Max("1") @Doco("active | recurrence | relapse | inactive | remission | resolved")
|
||||
@BindingStrength("required") @ValueSet("http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1")
|
||||
@Definition("The clinical status of the condition.")
|
||||
private CodeableConcept clinicalStatus; // active | recurrence | relapse | inactive | remission | resolved
|
||||
|
||||
@Min("0") @Max("1") @Doco("unconfirmed | provisional | differential | confirmed | refuted | entered-in-error")
|
||||
@BindingStrength("required") @ValueSet("http://hl7.org/fhir/ValueSet/condition-ver-status|4.0.1")
|
||||
@Definition("The verification status to support the clinical status of the condition.")
|
||||
private CodeableConcept verificationStatus; // unconfirmed | provisional | differential | confirmed | refuted | entered-in-error
|
||||
|
||||
@Min("0") @Max("1") @Doco("Identification of the condition, problem or diagnosis")
|
||||
@BindingStrength("example") @ValueSet("http://hl7.org/fhir/ValueSet/condition-code")
|
||||
@Definition("Identification of the condition, problem or diagnosis.")
|
||||
private CodeableConcept code; // Identification of the condition, problem or diagnosis
|
||||
|
||||
@Min("1") @Max("1") @Doco("Who has the condition?")
|
||||
@Definition("Indicates the patient or group who the condition record is associated with.")
|
||||
private Reference subject;// @NotNull // Who has the condition?
|
||||
|
||||
@Min("0") @Max("1") @Doco("Encounter created as part of")
|
||||
@Definition("The Encounter during which this Condition was created or to which the creation of this record is tightly associated.")
|
||||
private Reference encounter; // Encounter created as part of
|
||||
|
||||
@Min("0") @Max("1") @Doco("Who recorded the condition")
|
||||
@Definition("Individual who recorded the record and takes responsibility for its content.")
|
||||
private Reference recorder; // Who recorded the condition
|
||||
|
||||
@Min("0") @Max("1") @Doco("Person who asserts this condition")
|
||||
@Definition("Individual who is making the condition statement.")
|
||||
private Reference asserter; // Person who asserts this condition
|
||||
|
||||
@Min("0") @Max("*") @Doco("Stage/grade, usually assessed formally")
|
||||
@Definition("Clinical stage or grade of a condition. May include formal severity assessments.")
|
||||
private List<BackboneElement> stages = new ArrayList<>(); // Stage/grade, usually assessed formally
|
||||
|
||||
@Min("0") @Max("*") @Doco("Supporting evidence")
|
||||
@Definition("Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.")
|
||||
private List<BackboneElement> evidences = new ArrayList<>(); // Supporting evidence
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional information about the Condition")
|
||||
@Definition("Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.")
|
||||
private List<Annotation> notes = new ArrayList<>(); // Additional information about the Condition
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreCondition() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of the object, and fill out all the fixed values
|
||||
*
|
||||
*/
|
||||
public DkCoreCondition(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, builder.createResource(CANONICAL_URL, false));
|
||||
load(src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public static DkCoreCondition fromSource(IWorkerContext context, Condition source) {
|
||||
DkCoreCondition theThing = new DkCoreCondition();
|
||||
theThing.workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, source);
|
||||
theThing.load(src);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("id")) {
|
||||
id = ((IdType) src.child("id").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("conditionLastAssertedDate")) {
|
||||
conditionLastAssertedDate = ((DateTimeType) src.child("conditionLastAssertedDate").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("notFollowedAnymore")) {
|
||||
notFollowedAnymore = ((DateTimeType) src.child("notFollowedAnymore").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("modifierExtension")) {
|
||||
modifierExtensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("identifier")) {
|
||||
identifiers.add((Identifier) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("clinicalStatus")) {
|
||||
clinicalStatus = (CodeableConcept) src.child("clinicalStatus").asDataType();
|
||||
}
|
||||
if (src.hasChild("verificationStatus")) {
|
||||
verificationStatus = (CodeableConcept) src.child("verificationStatus").asDataType();
|
||||
}
|
||||
if (src.hasChild("code")) {
|
||||
code = (CodeableConcept) src.child("code").asDataType();
|
||||
}
|
||||
if (src.hasChild("subject")) {
|
||||
subject = (Reference) src.child("subject").asDataType();
|
||||
}
|
||||
if (src.hasChild("encounter")) {
|
||||
encounter = (Reference) src.child("encounter").asDataType();
|
||||
}
|
||||
if (src.hasChild("recorder")) {
|
||||
recorder = (Reference) src.child("recorder").asDataType();
|
||||
}
|
||||
if (src.hasChild("asserter")) {
|
||||
asserter = (Reference) src.child("asserter").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("stage")) {
|
||||
stages.add((BackboneElement) item.asElement());
|
||||
}
|
||||
for (PEInstance item : src.children("evidence")) {
|
||||
evidences.add((BackboneElement) item.asElement());
|
||||
}
|
||||
for (PEInstance item : src.children("note")) {
|
||||
notes.add((Annotation) item.asDataType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public Condition build(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
Condition theThing = new Condition();
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, theThing);
|
||||
save(tgt, false);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this profile class into an existing resource (overwriting anything that
|
||||
* exists in the profile)
|
||||
*
|
||||
*/
|
||||
public void save(IWorkerContext context, Condition dest, boolean nulls) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, dest);
|
||||
save(tgt, nulls);
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("id");
|
||||
if (id != null) {
|
||||
tgt.makeChild("id").data().setProperty("value", new IdType(id));
|
||||
}
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("conditionLastAssertedDate");
|
||||
if (conditionLastAssertedDate != null) {
|
||||
tgt.makeChild("conditionLastAssertedDate").data().setProperty("value[x]", new DateTimeType(conditionLastAssertedDate));
|
||||
}
|
||||
tgt.clear("notFollowedAnymore");
|
||||
if (notFollowedAnymore != null) {
|
||||
tgt.makeChild("notFollowedAnymore").data().setProperty("value[x]", new DateTimeType(notFollowedAnymore));
|
||||
}
|
||||
tgt.clear("modifierExtension");
|
||||
for (Extension item : modifierExtensions) {
|
||||
tgt.addChild("modifierExtension", item);
|
||||
}
|
||||
tgt.clear("identifier");
|
||||
for (Identifier item : identifiers) {
|
||||
tgt.addChild("identifier", item);
|
||||
}
|
||||
tgt.clear("clinicalStatus");
|
||||
if (clinicalStatus != null) {
|
||||
tgt.addChild("clinicalStatus", clinicalStatus);
|
||||
}
|
||||
tgt.clear("verificationStatus");
|
||||
if (verificationStatus != null) {
|
||||
tgt.addChild("verificationStatus", verificationStatus);
|
||||
}
|
||||
tgt.clear("code");
|
||||
if (code != null) {
|
||||
tgt.addChild("code", code);
|
||||
}
|
||||
tgt.clear("subject");
|
||||
if (subject != null) {
|
||||
tgt.addChild("subject", subject);
|
||||
}
|
||||
tgt.clear("encounter");
|
||||
if (encounter != null) {
|
||||
tgt.addChild("encounter", encounter);
|
||||
}
|
||||
tgt.clear("recorder");
|
||||
if (recorder != null) {
|
||||
tgt.addChild("recorder", recorder);
|
||||
}
|
||||
tgt.clear("asserter");
|
||||
if (asserter != null) {
|
||||
tgt.addChild("asserter", asserter);
|
||||
}
|
||||
tgt.clear("stage");
|
||||
for (BackboneElement item : stages) {
|
||||
tgt.addChild("stage", item);
|
||||
}
|
||||
tgt.clear("evidence");
|
||||
for (BackboneElement item : evidences) {
|
||||
tgt.addChild("evidence", item);
|
||||
}
|
||||
tgt.clear("note");
|
||||
for (Annotation item : notes) {
|
||||
tgt.addChild("note", item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DkCoreCondition setId(String value) {
|
||||
this.id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasId() {
|
||||
return id != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public Date getConditionLastAssertedDate() {
|
||||
return conditionLastAssertedDate;
|
||||
}
|
||||
|
||||
public DkCoreCondition setConditionLastAssertedDate(Date value) {
|
||||
this.conditionLastAssertedDate = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasConditionLastAssertedDate() {
|
||||
return conditionLastAssertedDate != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public Date getNotFollowedAnymore() {
|
||||
return notFollowedAnymore;
|
||||
}
|
||||
|
||||
public DkCoreCondition setNotFollowedAnymore(Date value) {
|
||||
this.notFollowedAnymore = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasNotFollowedAnymore() {
|
||||
return notFollowedAnymore != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getModifierExtensions() {
|
||||
if (modifierExtensions == null) { modifierExtensions = new ArrayList<>(); }
|
||||
return modifierExtensions;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtensions() {
|
||||
return modifierExtensions != null && !modifierExtensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addModifierExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getModifierExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtension(Extension item) {
|
||||
return hasModifierExtensions() && modifierExtensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeModifierExtension(Extension item) {
|
||||
if (hasModifierExtension(item)) {
|
||||
modifierExtensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public List<Identifier> getIdentifiers() {
|
||||
if (identifiers == null) { identifiers = new ArrayList<>(); }
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public boolean hasIdentifiers() {
|
||||
return identifiers != null && !identifiers.isEmpty();
|
||||
}
|
||||
|
||||
public Identifier addIdentifier() {
|
||||
Identifier theThing = new Identifier();
|
||||
getIdentifiers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasIdentifier(Identifier item) {
|
||||
return hasIdentifiers() && identifiers.contains(item);
|
||||
}
|
||||
|
||||
public void removeIdentifier(Identifier item) {
|
||||
if (hasIdentifier(item)) {
|
||||
identifiers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getClinicalStatus() {
|
||||
if (clinicalStatus == null) { clinicalStatus = new CodeableConcept(); }
|
||||
return clinicalStatus;
|
||||
}
|
||||
|
||||
public DkCoreCondition setClinicalStatus(CodeableConcept value) {
|
||||
this.clinicalStatus = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasClinicalStatus() {
|
||||
return clinicalStatus != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getVerificationStatus() {
|
||||
if (verificationStatus == null) { verificationStatus = new CodeableConcept(); }
|
||||
return verificationStatus;
|
||||
}
|
||||
|
||||
public DkCoreCondition setVerificationStatus(CodeableConcept value) {
|
||||
this.verificationStatus = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasVerificationStatus() {
|
||||
return verificationStatus != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getCode() {
|
||||
if (code == null) { code = new CodeableConcept(); }
|
||||
return code;
|
||||
}
|
||||
|
||||
public DkCoreCondition setCode(CodeableConcept value) {
|
||||
this.code = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasCode() {
|
||||
return code != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public Reference getSubject() {
|
||||
if (subject == null) { subject = new Reference(); }
|
||||
return subject;
|
||||
}
|
||||
|
||||
public DkCoreCondition setSubject(Reference value) {
|
||||
this.subject = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasSubject() {
|
||||
return subject != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public Reference getEncounter() {
|
||||
if (encounter == null) { encounter = new Reference(); }
|
||||
return encounter;
|
||||
}
|
||||
|
||||
public DkCoreCondition setEncounter(Reference value) {
|
||||
this.encounter = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasEncounter() {
|
||||
return encounter != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public Reference getRecorder() {
|
||||
if (recorder == null) { recorder = new Reference(); }
|
||||
return recorder;
|
||||
}
|
||||
|
||||
public DkCoreCondition setRecorder(Reference value) {
|
||||
this.recorder = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasRecorder() {
|
||||
return recorder != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public Reference getAsserter() {
|
||||
if (asserter == null) { asserter = new Reference(); }
|
||||
return asserter;
|
||||
}
|
||||
|
||||
public DkCoreCondition setAsserter(Reference value) {
|
||||
this.asserter = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAsserter() {
|
||||
return asserter != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getStages() {
|
||||
if (stages == null) { stages = new ArrayList<>(); }
|
||||
return stages;
|
||||
}
|
||||
|
||||
public boolean hasStages() {
|
||||
return stages != null && !stages.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasStage(BackboneElement item) {
|
||||
return hasStages() && stages.contains(item);
|
||||
}
|
||||
|
||||
public void removeStage(BackboneElement item) {
|
||||
if (hasStage(item)) {
|
||||
stages.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getEvidences() {
|
||||
if (evidences == null) { evidences = new ArrayList<>(); }
|
||||
return evidences;
|
||||
}
|
||||
|
||||
public boolean hasEvidences() {
|
||||
return evidences != null && !evidences.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasEvidence(BackboneElement item) {
|
||||
return hasEvidences() && evidences.contains(item);
|
||||
}
|
||||
|
||||
public void removeEvidence(BackboneElement item) {
|
||||
if (hasEvidence(item)) {
|
||||
evidences.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A clinical condition, problem, diagnosis, or other event, situation, issue, or
|
||||
* clinical concept that has risen to a level of concern.
|
||||
*
|
||||
*/
|
||||
public List<Annotation> getNotes() {
|
||||
if (notes == null) { notes = new ArrayList<>(); }
|
||||
return notes;
|
||||
}
|
||||
|
||||
public boolean hasNotes() {
|
||||
return notes != null && !notes.isEmpty();
|
||||
}
|
||||
|
||||
public Annotation addNote() {
|
||||
Annotation theThing = new Annotation();
|
||||
getNotes().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasNote(Annotation item) {
|
||||
return hasNotes() && notes.contains(item);
|
||||
}
|
||||
|
||||
public void removeNote(Annotation item) {
|
||||
if (hasNote(item)) {
|
||||
notes.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
id = null;
|
||||
extensions.clear();
|
||||
conditionLastAssertedDate = null;
|
||||
notFollowedAnymore = null;
|
||||
modifierExtensions.clear();
|
||||
identifiers.clear();
|
||||
clinicalStatus = null;
|
||||
verificationStatus = null;
|
||||
code = null;
|
||||
subject = null;
|
||||
encounter = null;
|
||||
recorder = null;
|
||||
asserter = null;
|
||||
stages.clear();
|
||||
evidences.clear();
|
||||
notes.clear();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class DkCoreCprIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-cpr-identifier|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreCprIdentifier() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static DkCoreCprIdentifier fromSource(PEInstance source) {
|
||||
DkCoreCprIdentifier theThing = new DkCoreCprIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "urn:oid:1.2.208.176.1.2";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public DkCoreCprIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public DkCoreCprIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public DkCoreCprIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,328 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class DkCoreDeCprIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-d-ecpr-identifier|3.2.0";
|
||||
|
||||
public enum DkCoreDeCPRValueSet {
|
||||
URNOID122081761613, // "D-eCPR" = http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes#urn:oid:1.2.208.176.1.6.1.3
|
||||
URNOID122081761613177, // "D-eCPR fra Region Sjælland" = http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes#urn:oid:1.2.208.176.1.6.1.3.177
|
||||
URNOID122081761613179, // "D-eCPR fra Region Nordjylland" = http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes#urn:oid:1.2.208.176.1.6.1.3.179
|
||||
URNOID122081761613181, // "D-eCPR fra Region Midtjylland" = http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes#urn:oid:1.2.208.176.1.6.1.3.181
|
||||
URNOID122081761613183, // "D-eCPR fra Region Syddanmark" = http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes#urn:oid:1.2.208.176.1.6.1.3.183
|
||||
URNOID122081761613187; // "D-eCPR fra Region Hovedstaden" = http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes#urn:oid:1.2.208.176.1.6.1.3.187
|
||||
|
||||
public static DkCoreDeCPRValueSet fromCode(String s) {
|
||||
switch (s) {
|
||||
case "urn:oid:1.2.208.176.1.6.1.3": return URNOID122081761613;
|
||||
case "urn:oid:1.2.208.176.1.6.1.3.177": return URNOID122081761613177;
|
||||
case "urn:oid:1.2.208.176.1.6.1.3.179": return URNOID122081761613179;
|
||||
case "urn:oid:1.2.208.176.1.6.1.3.181": return URNOID122081761613181;
|
||||
case "urn:oid:1.2.208.176.1.6.1.3.183": return URNOID122081761613183;
|
||||
case "urn:oid:1.2.208.176.1.6.1.3.187": return URNOID122081761613187;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static DkCoreDeCPRValueSet fromCoding(Coding c) {
|
||||
if ("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes".equals(c.getSystem()) && "urn:oid:1.2.208.176.1.6.1.3".equals(c.getCode())) {
|
||||
return URNOID122081761613;
|
||||
}
|
||||
if ("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes".equals(c.getSystem()) && "urn:oid:1.2.208.176.1.6.1.3.177".equals(c.getCode())) {
|
||||
return URNOID122081761613177;
|
||||
}
|
||||
if ("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes".equals(c.getSystem()) && "urn:oid:1.2.208.176.1.6.1.3.179".equals(c.getCode())) {
|
||||
return URNOID122081761613179;
|
||||
}
|
||||
if ("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes".equals(c.getSystem()) && "urn:oid:1.2.208.176.1.6.1.3.181".equals(c.getCode())) {
|
||||
return URNOID122081761613181;
|
||||
}
|
||||
if ("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes".equals(c.getSystem()) && "urn:oid:1.2.208.176.1.6.1.3.183".equals(c.getCode())) {
|
||||
return URNOID122081761613183;
|
||||
}
|
||||
if ("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes".equals(c.getSystem()) && "urn:oid:1.2.208.176.1.6.1.3.187".equals(c.getCode())) {
|
||||
return URNOID122081761613187;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static DkCoreDeCPRValueSet fromCodeableConcept(CodeableConcept cc) {
|
||||
for (Coding c : cc.getCoding()) {
|
||||
DkCoreDeCPRValueSet v = fromCoding(c);
|
||||
if (v != null) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String toDisplay() {
|
||||
switch (this) {
|
||||
case URNOID122081761613: return "D-eCPR";
|
||||
case URNOID122081761613177: return "D-eCPR fra Region Sjælland";
|
||||
case URNOID122081761613179: return "D-eCPR fra Region Nordjylland";
|
||||
case URNOID122081761613181: return "D-eCPR fra Region Midtjylland";
|
||||
case URNOID122081761613183: return "D-eCPR fra Region Syddanmark";
|
||||
case URNOID122081761613187: return "D-eCPR fra Region Hovedstaden";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String toCode() {
|
||||
switch (this) {
|
||||
case URNOID122081761613: return "urn:oid:1.2.208.176.1.6.1.3";
|
||||
case URNOID122081761613177: return "urn:oid:1.2.208.176.1.6.1.3.177";
|
||||
case URNOID122081761613179: return "urn:oid:1.2.208.176.1.6.1.3.179";
|
||||
case URNOID122081761613181: return "urn:oid:1.2.208.176.1.6.1.3.181";
|
||||
case URNOID122081761613183: return "urn:oid:1.2.208.176.1.6.1.3.183";
|
||||
case URNOID122081761613187: return "urn:oid:1.2.208.176.1.6.1.3.187";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Coding toCoding() {
|
||||
switch (this) {
|
||||
case URNOID122081761613: return new Coding().setSystem("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes").setCode("urn:oid:1.2.208.176.1.6.1.3");
|
||||
case URNOID122081761613177: return new Coding().setSystem("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes").setCode("urn:oid:1.2.208.176.1.6.1.3.177");
|
||||
case URNOID122081761613179: return new Coding().setSystem("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes").setCode("urn:oid:1.2.208.176.1.6.1.3.179");
|
||||
case URNOID122081761613181: return new Coding().setSystem("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes").setCode("urn:oid:1.2.208.176.1.6.1.3.181");
|
||||
case URNOID122081761613183: return new Coding().setSystem("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes").setCode("urn:oid:1.2.208.176.1.6.1.3.183");
|
||||
case URNOID122081761613187: return new Coding().setSystem("http://hl7.dk/fhir/core/CodeSystem/dk-core-d-ecpr-codes").setCode("urn:oid:1.2.208.176.1.6.1.3.187");
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeableConcept toCodeableConcept() {
|
||||
Coding c = toCoding();
|
||||
return c == null ? null : new CodeableConcept().addCoding(c);
|
||||
}
|
||||
}
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@BindingStrength("required") @ValueSet("http://hl7.dk/fhir/core/ValueSet/DkCoreDeCPRValueSet")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private DkCoreDeCPRValueSet system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreDeCprIdentifier() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static DkCoreDeCprIdentifier fromSource(PEInstance source) {
|
||||
DkCoreDeCprIdentifier theThing = new DkCoreDeCprIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = DkCoreDeCPRValueSet.fromCode(src.child("system").asDataType().primitiveValue());
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.addChild("system", system.toCode());
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public DkCoreDeCPRValueSet getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public DkCoreDeCprIdentifier setSystem(DkCoreDeCPRValueSet value) {
|
||||
this.system = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return system != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public DkCoreDeCprIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public DkCoreDeCprIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public DkCoreDeCprIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,916 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public class DkCoreObservation extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-observation|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("")
|
||||
private String id; //
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extensions that cannot be ignored")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).")
|
||||
private List<Extension> modifierExtensions = new ArrayList<>(); // Extensions that cannot be ignored
|
||||
|
||||
@Min("0") @Max("*") @Doco("Business Identifier for observation")
|
||||
@Definition("A unique identifier assigned to this observation.")
|
||||
private List<Identifier> identifiers = new ArrayList<>(); // Business Identifier for observation
|
||||
|
||||
@Min("0") @Max("*") @Doco("Fulfills plan, proposal or order")
|
||||
@Definition("A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.")
|
||||
private List<Reference> basedOns = new ArrayList<>(); // Fulfills plan, proposal or order
|
||||
|
||||
@Min("0") @Max("*") @Doco("Part of referenced event")
|
||||
@Definition("A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.")
|
||||
private List<Reference> partOfs = new ArrayList<>(); // Part of referenced event
|
||||
|
||||
@Min("1") @Max("1") @Doco("registered | preliminary | final | amended +")
|
||||
@BindingStrength("required") @ValueSet("http://hl7.org/fhir/ValueSet/observation-status|4.0.1")
|
||||
@Definition("The status of the result value.")
|
||||
private String status;// @NotNull // registered | preliminary | final | amended +
|
||||
|
||||
@Min("1") @Max("1") @Doco("Type of observation (code / type)")
|
||||
@BindingStrength("example") @ValueSet("http://hl7.org/fhir/ValueSet/observation-codes")
|
||||
@Definition("Describes what was observed. Sometimes this is called the observation \"name\".")
|
||||
private CodeableConcept code;// @NotNull // Type of observation (code / type)
|
||||
|
||||
@Min("1") @Max("1") @Doco("Who and/or what the observation is about")
|
||||
@Definition("The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.")
|
||||
private Reference subject;// @NotNull // Who and/or what the observation is about
|
||||
|
||||
@Min("0") @Max("*") @Doco("What the observation is about, when it is not about the subject of record")
|
||||
@Definition("The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.")
|
||||
private List<Reference> focus = new ArrayList<>(); // What the observation is about, when it is not about the subject of record
|
||||
|
||||
@Min("0") @Max("1") @Doco("Healthcare event during which this observation is made")
|
||||
@Definition("The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.")
|
||||
private Reference encounter; // Healthcare event during which this observation is made
|
||||
|
||||
@Min("0") @Max("*") @Doco("Who is responsible for the observation")
|
||||
@Definition("Who was responsible for asserting the observed value as \"true\".")
|
||||
private List<Reference> performers = new ArrayList<>(); // Who is responsible for the observation
|
||||
|
||||
@Min("0") @Max("1") @Doco("Actual result")
|
||||
@Definition("The information determined as a result of making the observation, if the information has a simple value.")
|
||||
private Quantity value; // Actual result
|
||||
|
||||
@Min("0") @Max("1") @Doco("Why the result is missing")
|
||||
@BindingStrength("extensible") @ValueSet("http://hl7.org/fhir/ValueSet/data-absent-reason")
|
||||
@Definition("Provides a reason why the expected value in the element Observation.value[x] is missing.")
|
||||
private CodeableConcept dataAbsentReason; // Why the result is missing
|
||||
|
||||
@Min("0") @Max("*") @Doco("Comments about the observation")
|
||||
@Definition("Comments about the observation or the results.")
|
||||
private List<Annotation> notes = new ArrayList<>(); // Comments about the observation
|
||||
|
||||
@Min("0") @Max("1") @Doco("How it was done")
|
||||
@BindingStrength("example") @ValueSet("http://hl7.org/fhir/ValueSet/observation-methods")
|
||||
@Definition("Indicates the mechanism used to perform the observation.")
|
||||
private CodeableConcept method; // How it was done
|
||||
|
||||
@Min("0") @Max("1") @Doco("Specimen used for this observation")
|
||||
@Definition("The specimen that was used when this observation was made.")
|
||||
private Reference specimen; // Specimen used for this observation
|
||||
|
||||
@Min("0") @Max("1") @Doco("The device used for the measurement. It is recommended that when information about the device is sent, it is contained in the same Bundle as the Observation the device measured.")
|
||||
@Definition("The device used to generate the observation data.")
|
||||
private Reference device; // The device used for the measurement. It is recommended that when information about the device is sent, it is contained in the same Bundle as the Observation the device measured.
|
||||
|
||||
@Min("0") @Max("*") @Doco("Provides guide for interpretation")
|
||||
@Definition("Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an \"OR\". In other words, to represent two distinct target populations, two `referenceRange` elements would be used.")
|
||||
private List<BackboneElement> referenceRanges = new ArrayList<>(); // Provides guide for interpretation
|
||||
|
||||
@Min("0") @Max("*") @Doco("Related resource that belongs to the Observation group")
|
||||
@Definition("This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.")
|
||||
private List<Reference> hasMembers = new ArrayList<>(); // Related resource that belongs to the Observation group
|
||||
|
||||
@Min("0") @Max("*") @Doco("Related measurements the observation is made from")
|
||||
@Definition("The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.")
|
||||
private List<Reference> derivedFroms = new ArrayList<>(); // Related measurements the observation is made from
|
||||
|
||||
@Min("0") @Max("*") @Doco("Component results")
|
||||
@Definition("Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.")
|
||||
private List<BackboneElement> components = new ArrayList<>(); // Component results
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreObservation() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of the object, and fill out all the fixed values
|
||||
*
|
||||
*/
|
||||
public DkCoreObservation(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, builder.createResource(CANONICAL_URL, false));
|
||||
load(src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public static DkCoreObservation fromSource(IWorkerContext context, Observation source) {
|
||||
DkCoreObservation theThing = new DkCoreObservation();
|
||||
theThing.workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, source);
|
||||
theThing.load(src);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("id")) {
|
||||
id = ((IdType) src.child("id").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("modifierExtension")) {
|
||||
modifierExtensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("identifier")) {
|
||||
identifiers.add((Identifier) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("basedOn")) {
|
||||
basedOns.add((Reference) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("partOf")) {
|
||||
partOfs.add((Reference) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("status")) {
|
||||
status = src.child("status").asDataType().primitiveValue();
|
||||
}
|
||||
if (src.hasChild("code")) {
|
||||
code = (CodeableConcept) src.child("code").asDataType();
|
||||
}
|
||||
if (src.hasChild("subject")) {
|
||||
subject = (Reference) src.child("subject").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("focus")) {
|
||||
focus.add((Reference) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("encounter")) {
|
||||
encounter = (Reference) src.child("encounter").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("performer")) {
|
||||
performers.add((Reference) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = (Quantity) src.child("value").asDataType();
|
||||
}
|
||||
if (src.hasChild("dataAbsentReason")) {
|
||||
dataAbsentReason = (CodeableConcept) src.child("dataAbsentReason").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("note")) {
|
||||
notes.add((Annotation) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("method")) {
|
||||
method = (CodeableConcept) src.child("method").asDataType();
|
||||
}
|
||||
if (src.hasChild("specimen")) {
|
||||
specimen = (Reference) src.child("specimen").asDataType();
|
||||
}
|
||||
if (src.hasChild("device")) {
|
||||
device = (Reference) src.child("device").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("referenceRange")) {
|
||||
referenceRanges.add((BackboneElement) item.asElement());
|
||||
}
|
||||
for (PEInstance item : src.children("hasMember")) {
|
||||
hasMembers.add((Reference) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("derivedFrom")) {
|
||||
derivedFroms.add((Reference) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("component")) {
|
||||
components.add((BackboneElement) item.asElement());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public Observation build(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
Observation theThing = new Observation();
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, theThing);
|
||||
save(tgt, false);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this profile class into an existing resource (overwriting anything that
|
||||
* exists in the profile)
|
||||
*
|
||||
*/
|
||||
public void save(IWorkerContext context, Observation dest, boolean nulls) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, dest);
|
||||
save(tgt, nulls);
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("id");
|
||||
if (id != null) {
|
||||
tgt.makeChild("id").data().setProperty("value", new IdType(id));
|
||||
}
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("modifierExtension");
|
||||
for (Extension item : modifierExtensions) {
|
||||
tgt.addChild("modifierExtension", item);
|
||||
}
|
||||
tgt.clear("identifier");
|
||||
for (Identifier item : identifiers) {
|
||||
tgt.addChild("identifier", item);
|
||||
}
|
||||
tgt.clear("basedOn");
|
||||
for (Reference item : basedOns) {
|
||||
tgt.addChild("basedOn", item);
|
||||
}
|
||||
tgt.clear("partOf");
|
||||
for (Reference item : partOfs) {
|
||||
tgt.addChild("partOf", item);
|
||||
}
|
||||
tgt.clear("status");
|
||||
if (status != null) {
|
||||
tgt.makeChild("status").data().setProperty("value", new CodeType(status));
|
||||
}
|
||||
tgt.clear("code");
|
||||
if (code != null) {
|
||||
tgt.addChild("code", code);
|
||||
}
|
||||
tgt.clear("subject");
|
||||
if (subject != null) {
|
||||
tgt.addChild("subject", subject);
|
||||
}
|
||||
tgt.clear("focus");
|
||||
for (Reference item : focus) {
|
||||
tgt.addChild("focus", item);
|
||||
}
|
||||
tgt.clear("encounter");
|
||||
if (encounter != null) {
|
||||
tgt.addChild("encounter", encounter);
|
||||
}
|
||||
tgt.clear("performer");
|
||||
for (Reference item : performers) {
|
||||
tgt.addChild("performer", item);
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.addChild("value", value);
|
||||
}
|
||||
tgt.clear("dataAbsentReason");
|
||||
if (dataAbsentReason != null) {
|
||||
tgt.addChild("dataAbsentReason", dataAbsentReason);
|
||||
}
|
||||
tgt.clear("note");
|
||||
for (Annotation item : notes) {
|
||||
tgt.addChild("note", item);
|
||||
}
|
||||
tgt.clear("method");
|
||||
if (method != null) {
|
||||
tgt.addChild("method", method);
|
||||
}
|
||||
tgt.clear("specimen");
|
||||
if (specimen != null) {
|
||||
tgt.addChild("specimen", specimen);
|
||||
}
|
||||
tgt.clear("device");
|
||||
if (device != null) {
|
||||
tgt.addChild("device", device);
|
||||
}
|
||||
tgt.clear("referenceRange");
|
||||
for (BackboneElement item : referenceRanges) {
|
||||
tgt.addChild("referenceRange", item);
|
||||
}
|
||||
tgt.clear("hasMember");
|
||||
for (Reference item : hasMembers) {
|
||||
tgt.addChild("hasMember", item);
|
||||
}
|
||||
tgt.clear("derivedFrom");
|
||||
for (Reference item : derivedFroms) {
|
||||
tgt.addChild("derivedFrom", item);
|
||||
}
|
||||
tgt.clear("component");
|
||||
for (BackboneElement item : components) {
|
||||
tgt.addChild("component", item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DkCoreObservation setId(String value) {
|
||||
this.id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasId() {
|
||||
return id != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getModifierExtensions() {
|
||||
if (modifierExtensions == null) { modifierExtensions = new ArrayList<>(); }
|
||||
return modifierExtensions;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtensions() {
|
||||
return modifierExtensions != null && !modifierExtensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addModifierExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getModifierExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtension(Extension item) {
|
||||
return hasModifierExtensions() && modifierExtensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeModifierExtension(Extension item) {
|
||||
if (hasModifierExtension(item)) {
|
||||
modifierExtensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Identifier> getIdentifiers() {
|
||||
if (identifiers == null) { identifiers = new ArrayList<>(); }
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public boolean hasIdentifiers() {
|
||||
return identifiers != null && !identifiers.isEmpty();
|
||||
}
|
||||
|
||||
public Identifier addIdentifier() {
|
||||
Identifier theThing = new Identifier();
|
||||
getIdentifiers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasIdentifier(Identifier item) {
|
||||
return hasIdentifiers() && identifiers.contains(item);
|
||||
}
|
||||
|
||||
public void removeIdentifier(Identifier item) {
|
||||
if (hasIdentifier(item)) {
|
||||
identifiers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getBasedOns() {
|
||||
if (basedOns == null) { basedOns = new ArrayList<>(); }
|
||||
return basedOns;
|
||||
}
|
||||
|
||||
public boolean hasBasedOns() {
|
||||
return basedOns != null && !basedOns.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addBasedOn() {
|
||||
Reference theThing = new Reference();
|
||||
getBasedOns().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasBasedOn(Reference item) {
|
||||
return hasBasedOns() && basedOns.contains(item);
|
||||
}
|
||||
|
||||
public void removeBasedOn(Reference item) {
|
||||
if (hasBasedOn(item)) {
|
||||
basedOns.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getPartOfs() {
|
||||
if (partOfs == null) { partOfs = new ArrayList<>(); }
|
||||
return partOfs;
|
||||
}
|
||||
|
||||
public boolean hasPartOfs() {
|
||||
return partOfs != null && !partOfs.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addPartOf() {
|
||||
Reference theThing = new Reference();
|
||||
getPartOfs().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasPartOf(Reference item) {
|
||||
return hasPartOfs() && partOfs.contains(item);
|
||||
}
|
||||
|
||||
public void removePartOf(Reference item) {
|
||||
if (hasPartOf(item)) {
|
||||
partOfs.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public DkCoreObservation setStatus(String value) {
|
||||
this.status = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasStatus() {
|
||||
return status != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getCode() {
|
||||
if (code == null) { code = new CodeableConcept(); }
|
||||
return code;
|
||||
}
|
||||
|
||||
public DkCoreObservation setCode(CodeableConcept value) {
|
||||
this.code = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasCode() {
|
||||
return code != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getSubject() {
|
||||
if (subject == null) { subject = new Reference(); }
|
||||
return subject;
|
||||
}
|
||||
|
||||
public DkCoreObservation setSubject(Reference value) {
|
||||
this.subject = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasSubject() {
|
||||
return subject != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getFocus() {
|
||||
if (focus == null) { focus = new ArrayList<>(); }
|
||||
return focus;
|
||||
}
|
||||
|
||||
public boolean hasFocus() {
|
||||
return focus != null && !focus.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addFocus() {
|
||||
Reference theThing = new Reference();
|
||||
getFocus().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasFocus(Reference item) {
|
||||
return hasFocus() && focus.contains(item);
|
||||
}
|
||||
|
||||
public void removeFocus(Reference item) {
|
||||
if (hasFocus(item)) {
|
||||
focus.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getEncounter() {
|
||||
if (encounter == null) { encounter = new Reference(); }
|
||||
return encounter;
|
||||
}
|
||||
|
||||
public DkCoreObservation setEncounter(Reference value) {
|
||||
this.encounter = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasEncounter() {
|
||||
return encounter != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getPerformers() {
|
||||
if (performers == null) { performers = new ArrayList<>(); }
|
||||
return performers;
|
||||
}
|
||||
|
||||
public boolean hasPerformers() {
|
||||
return performers != null && !performers.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addPerformer() {
|
||||
Reference theThing = new Reference();
|
||||
getPerformers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasPerformer(Reference item) {
|
||||
return hasPerformers() && performers.contains(item);
|
||||
}
|
||||
|
||||
public void removePerformer(Reference item) {
|
||||
if (hasPerformer(item)) {
|
||||
performers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Quantity getValue() {
|
||||
if (value == null) { value = new Quantity(); }
|
||||
return value;
|
||||
}
|
||||
|
||||
public DkCoreObservation setValue(Quantity value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getDataAbsentReason() {
|
||||
if (dataAbsentReason == null) { dataAbsentReason = new CodeableConcept(); }
|
||||
return dataAbsentReason;
|
||||
}
|
||||
|
||||
public DkCoreObservation setDataAbsentReason(CodeableConcept value) {
|
||||
this.dataAbsentReason = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasDataAbsentReason() {
|
||||
return dataAbsentReason != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Annotation> getNotes() {
|
||||
if (notes == null) { notes = new ArrayList<>(); }
|
||||
return notes;
|
||||
}
|
||||
|
||||
public boolean hasNotes() {
|
||||
return notes != null && !notes.isEmpty();
|
||||
}
|
||||
|
||||
public Annotation addNote() {
|
||||
Annotation theThing = new Annotation();
|
||||
getNotes().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasNote(Annotation item) {
|
||||
return hasNotes() && notes.contains(item);
|
||||
}
|
||||
|
||||
public void removeNote(Annotation item) {
|
||||
if (hasNote(item)) {
|
||||
notes.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getMethod() {
|
||||
if (method == null) { method = new CodeableConcept(); }
|
||||
return method;
|
||||
}
|
||||
|
||||
public DkCoreObservation setMethod(CodeableConcept value) {
|
||||
this.method = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasMethod() {
|
||||
return method != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getSpecimen() {
|
||||
if (specimen == null) { specimen = new Reference(); }
|
||||
return specimen;
|
||||
}
|
||||
|
||||
public DkCoreObservation setSpecimen(Reference value) {
|
||||
this.specimen = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasSpecimen() {
|
||||
return specimen != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public Reference getDevice() {
|
||||
if (device == null) { device = new Reference(); }
|
||||
return device;
|
||||
}
|
||||
|
||||
public DkCoreObservation setDevice(Reference value) {
|
||||
this.device = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasDevice() {
|
||||
return device != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getReferenceRanges() {
|
||||
if (referenceRanges == null) { referenceRanges = new ArrayList<>(); }
|
||||
return referenceRanges;
|
||||
}
|
||||
|
||||
public boolean hasReferenceRanges() {
|
||||
return referenceRanges != null && !referenceRanges.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasReferenceRange(BackboneElement item) {
|
||||
return hasReferenceRanges() && referenceRanges.contains(item);
|
||||
}
|
||||
|
||||
public void removeReferenceRange(BackboneElement item) {
|
||||
if (hasReferenceRange(item)) {
|
||||
referenceRanges.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getHasMembers() {
|
||||
if (hasMembers == null) { hasMembers = new ArrayList<>(); }
|
||||
return hasMembers;
|
||||
}
|
||||
|
||||
public boolean hasHasMembers() {
|
||||
return hasMembers != null && !hasMembers.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addHasMember() {
|
||||
Reference theThing = new Reference();
|
||||
getHasMembers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasHasMember(Reference item) {
|
||||
return hasHasMembers() && hasMembers.contains(item);
|
||||
}
|
||||
|
||||
public void removeHasMember(Reference item) {
|
||||
if (hasHasMember(item)) {
|
||||
hasMembers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getDerivedFroms() {
|
||||
if (derivedFroms == null) { derivedFroms = new ArrayList<>(); }
|
||||
return derivedFroms;
|
||||
}
|
||||
|
||||
public boolean hasDerivedFroms() {
|
||||
return derivedFroms != null && !derivedFroms.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addDerivedFrom() {
|
||||
Reference theThing = new Reference();
|
||||
getDerivedFroms().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasDerivedFrom(Reference item) {
|
||||
return hasDerivedFroms() && derivedFroms.contains(item);
|
||||
}
|
||||
|
||||
public void removeDerivedFrom(Reference item) {
|
||||
if (hasDerivedFrom(item)) {
|
||||
derivedFroms.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Measurements and simple assertions made about a patient, device or other
|
||||
* subject.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getComponents() {
|
||||
if (components == null) { components = new ArrayList<>(); }
|
||||
return components;
|
||||
}
|
||||
|
||||
public boolean hasComponents() {
|
||||
return components != null && !components.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasComponent(BackboneElement item) {
|
||||
return hasComponents() && components.contains(item);
|
||||
}
|
||||
|
||||
public void removeComponent(BackboneElement item) {
|
||||
if (hasComponent(item)) {
|
||||
components.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
id = null;
|
||||
extensions.clear();
|
||||
modifierExtensions.clear();
|
||||
identifiers.clear();
|
||||
basedOns.clear();
|
||||
partOfs.clear();
|
||||
status = null;
|
||||
code = null;
|
||||
subject = null;
|
||||
focus.clear();
|
||||
encounter = null;
|
||||
performers.clear();
|
||||
value = null;
|
||||
dataAbsentReason = null;
|
||||
notes.clear();
|
||||
method = null;
|
||||
specimen = null;
|
||||
device = null;
|
||||
referenceRanges.clear();
|
||||
hasMembers.clear();
|
||||
derivedFroms.clear();
|
||||
components.clear();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,771 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public class DkCoreOrganization extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-organization|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("")
|
||||
private String id; //
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extensions that cannot be ignored")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).")
|
||||
private List<Extension> modifierExtensions = new ArrayList<>(); // Extensions that cannot be ignored
|
||||
|
||||
@Min("1") @Max("*") @Doco("Identifies this organization across multiple systems")
|
||||
@Definition("Identifier for the organization that is used to identify the organization across multiple disparate systems.")
|
||||
private List<Identifier> identifiers = new ArrayList<>();// @NotNull // Identifies this organization across multiple systems
|
||||
|
||||
@Min("0") @Max("1") @Doco("GLN identifier, [DA] EAN-nummer")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private GLNIdentifier EANID; // GLN identifier, [DA] EAN-nummer
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] SOR-id")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private SORIdentifier SORID; // [DA] SOR-id
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] Organisationsenheds-id som specificeret af FK-ORG")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private KombitOrgIdentifier KOMBITORGID; // [DA] Organisationsenheds-id som specificeret af FK-ORG
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] Ydernummer")
|
||||
@Definition("Identifier for the organization that is used to identify the organization across multiple disparate systems.")
|
||||
private Identifier Ydernummer; // [DA] Ydernummer
|
||||
|
||||
@Min("0") @Max("1") @Doco("VAT identification number, [DA] CVR-nummer")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private CVRIdentifier CVRID; // VAT identification number, [DA] CVR-nummer
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] Kommunekode")
|
||||
@Definition("Identifier for the organization that is used to identify the organization across multiple disparate systems.")
|
||||
private Identifier Kommunekode; // [DA] Kommunekode
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] Regionskode")
|
||||
@Definition("Identifier for the organization that is used to identify the organization across multiple disparate systems.")
|
||||
private Identifier Regionskode; // [DA] Regionskode
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] Producent Id")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private ProducentId ProducentID; // [DA] Producent Id
|
||||
|
||||
@Min("0") @Max("1") @Doco("Name used for the organization")
|
||||
@Definition("A name associated with the organization.")
|
||||
private String name; // Name used for the organization
|
||||
|
||||
@Min("0") @Max("*") @Doco("A contact detail for the organization")
|
||||
@Definition("A contact detail for the organization.")
|
||||
private List<ContactPoint> telecoms = new ArrayList<>(); // A contact detail for the organization
|
||||
|
||||
@Min("0") @Max("*") @Doco("An address for the organization")
|
||||
@Definition("An address for the organization.")
|
||||
private List<Address> addresses = new ArrayList<>(); // An address for the organization
|
||||
|
||||
@Min("0") @Max("1") @Doco("The organization of which this organization forms a part")
|
||||
@Definition("The organization of which this organization forms a part.")
|
||||
private Reference partOf; // The organization of which this organization forms a part
|
||||
|
||||
@Min("0") @Max("*") @Doco("Contact for the organization for a certain purpose")
|
||||
@Definition("Contact for the organization for a certain purpose.")
|
||||
private List<BackboneElement> contacts = new ArrayList<>(); // Contact for the organization for a certain purpose
|
||||
|
||||
@Min("0") @Max("*") @Doco("Technical endpoints providing access to services operated for the organization")
|
||||
@Definition("Technical endpoints providing access to services operated for the organization.")
|
||||
private List<Reference> endpoints = new ArrayList<>(); // Technical endpoints providing access to services operated for the organization
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreOrganization() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of the object, and fill out all the fixed values
|
||||
*
|
||||
*/
|
||||
public DkCoreOrganization(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, builder.createResource(CANONICAL_URL, false));
|
||||
load(src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public static DkCoreOrganization fromSource(IWorkerContext context, Organization source) {
|
||||
DkCoreOrganization theThing = new DkCoreOrganization();
|
||||
theThing.workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, source);
|
||||
theThing.load(src);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("id")) {
|
||||
id = ((IdType) src.child("id").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("modifierExtension")) {
|
||||
modifierExtensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("identifier")) {
|
||||
identifiers.add((Identifier) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("EANID")) {
|
||||
EANID = GLNIdentifier.fromSource(src.child("EANID"));
|
||||
}
|
||||
if (src.hasChild("SORID")) {
|
||||
SORID = SORIdentifier.fromSource(src.child("SORID"));
|
||||
}
|
||||
if (src.hasChild("KOMBITORGID")) {
|
||||
KOMBITORGID = KombitOrgIdentifier.fromSource(src.child("KOMBITORGID"));
|
||||
}
|
||||
if (src.hasChild("Ydernummer")) {
|
||||
Ydernummer = (Identifier) src.child("Ydernummer").asDataType();
|
||||
}
|
||||
if (src.hasChild("CVRID")) {
|
||||
CVRID = CVRIdentifier.fromSource(src.child("CVRID"));
|
||||
}
|
||||
if (src.hasChild("Kommunekode")) {
|
||||
Kommunekode = (Identifier) src.child("Kommunekode").asDataType();
|
||||
}
|
||||
if (src.hasChild("Regionskode")) {
|
||||
Regionskode = (Identifier) src.child("Regionskode").asDataType();
|
||||
}
|
||||
if (src.hasChild("ProducentID")) {
|
||||
ProducentID = ProducentId.fromSource(src.child("ProducentID"));
|
||||
}
|
||||
if (src.hasChild("name")) {
|
||||
name = ((StringType) src.child("name").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("telecom")) {
|
||||
telecoms.add((ContactPoint) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("address")) {
|
||||
addresses.add((Address) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("partOf")) {
|
||||
partOf = (Reference) src.child("partOf").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("contact")) {
|
||||
contacts.add((BackboneElement) item.asElement());
|
||||
}
|
||||
for (PEInstance item : src.children("endpoint")) {
|
||||
endpoints.add((Reference) item.asDataType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public Organization build(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
Organization theThing = new Organization();
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, theThing);
|
||||
save(tgt, false);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this profile class into an existing resource (overwriting anything that
|
||||
* exists in the profile)
|
||||
*
|
||||
*/
|
||||
public void save(IWorkerContext context, Organization dest, boolean nulls) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, dest);
|
||||
save(tgt, nulls);
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("id");
|
||||
if (id != null) {
|
||||
tgt.makeChild("id").data().setProperty("value", new IdType(id));
|
||||
}
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("modifierExtension");
|
||||
for (Extension item : modifierExtensions) {
|
||||
tgt.addChild("modifierExtension", item);
|
||||
}
|
||||
tgt.clear("identifier");
|
||||
for (Identifier item : identifiers) {
|
||||
tgt.addChild("identifier", item);
|
||||
}
|
||||
tgt.clear("EANID");
|
||||
if (EANID != null) {
|
||||
EANID.save(tgt.makeChild("EANID"), nulls);
|
||||
}
|
||||
tgt.clear("SORID");
|
||||
if (SORID != null) {
|
||||
SORID.save(tgt.makeChild("SORID"), nulls);
|
||||
}
|
||||
tgt.clear("KOMBITORGID");
|
||||
if (KOMBITORGID != null) {
|
||||
KOMBITORGID.save(tgt.makeChild("KOMBITORGID"), nulls);
|
||||
}
|
||||
tgt.clear("Ydernummer");
|
||||
if (Ydernummer != null) {
|
||||
tgt.addChild("Ydernummer", Ydernummer);
|
||||
}
|
||||
tgt.clear("CVRID");
|
||||
if (CVRID != null) {
|
||||
CVRID.save(tgt.makeChild("CVRID"), nulls);
|
||||
}
|
||||
tgt.clear("Kommunekode");
|
||||
if (Kommunekode != null) {
|
||||
tgt.addChild("Kommunekode", Kommunekode);
|
||||
}
|
||||
tgt.clear("Regionskode");
|
||||
if (Regionskode != null) {
|
||||
tgt.addChild("Regionskode", Regionskode);
|
||||
}
|
||||
tgt.clear("ProducentID");
|
||||
if (ProducentID != null) {
|
||||
ProducentID.save(tgt.makeChild("ProducentID"), nulls);
|
||||
}
|
||||
tgt.clear("name");
|
||||
if (name != null) {
|
||||
tgt.makeChild("name").data().setProperty("value", new StringType(name));
|
||||
}
|
||||
tgt.clear("telecom");
|
||||
for (ContactPoint item : telecoms) {
|
||||
tgt.addChild("telecom", item);
|
||||
}
|
||||
tgt.clear("address");
|
||||
for (Address item : addresses) {
|
||||
tgt.addChild("address", item);
|
||||
}
|
||||
tgt.clear("partOf");
|
||||
if (partOf != null) {
|
||||
tgt.addChild("partOf", partOf);
|
||||
}
|
||||
tgt.clear("contact");
|
||||
for (BackboneElement item : contacts) {
|
||||
tgt.addChild("contact", item);
|
||||
}
|
||||
tgt.clear("endpoint");
|
||||
for (Reference item : endpoints) {
|
||||
tgt.addChild("endpoint", item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setId(String value) {
|
||||
this.id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasId() {
|
||||
return id != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getModifierExtensions() {
|
||||
if (modifierExtensions == null) { modifierExtensions = new ArrayList<>(); }
|
||||
return modifierExtensions;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtensions() {
|
||||
return modifierExtensions != null && !modifierExtensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addModifierExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getModifierExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtension(Extension item) {
|
||||
return hasModifierExtensions() && modifierExtensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeModifierExtension(Extension item) {
|
||||
if (hasModifierExtension(item)) {
|
||||
modifierExtensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public List<Identifier> getIdentifiers() {
|
||||
if (identifiers == null) { identifiers = new ArrayList<>(); }
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public boolean hasIdentifiers() {
|
||||
return identifiers != null && !identifiers.isEmpty();
|
||||
}
|
||||
|
||||
public Identifier addIdentifier() {
|
||||
Identifier theThing = new Identifier();
|
||||
getIdentifiers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasIdentifier(Identifier item) {
|
||||
return hasIdentifiers() && identifiers.contains(item);
|
||||
}
|
||||
|
||||
public void removeIdentifier(Identifier item) {
|
||||
if (hasIdentifier(item)) {
|
||||
identifiers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public GLNIdentifier getEANID() {
|
||||
if (EANID == null) { EANID = new GLNIdentifier(); }
|
||||
return EANID;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setEANID(GLNIdentifier value) {
|
||||
this.EANID = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasEANID() {
|
||||
return EANID != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public SORIdentifier getSORID() {
|
||||
if (SORID == null) { SORID = new SORIdentifier(); }
|
||||
return SORID;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setSORID(SORIdentifier value) {
|
||||
this.SORID = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasSORID() {
|
||||
return SORID != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public KombitOrgIdentifier getKOMBITORGID() {
|
||||
if (KOMBITORGID == null) { KOMBITORGID = new KombitOrgIdentifier(); }
|
||||
return KOMBITORGID;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setKOMBITORGID(KombitOrgIdentifier value) {
|
||||
this.KOMBITORGID = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasKOMBITORGID() {
|
||||
return KOMBITORGID != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public Identifier getYdernummer() {
|
||||
if (Ydernummer == null) { Ydernummer = new Identifier(); }
|
||||
return Ydernummer;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setYdernummer(Identifier value) {
|
||||
this.Ydernummer = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasYdernummer() {
|
||||
return Ydernummer != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public CVRIdentifier getCVRID() {
|
||||
if (CVRID == null) { CVRID = new CVRIdentifier(); }
|
||||
return CVRID;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setCVRID(CVRIdentifier value) {
|
||||
this.CVRID = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasCVRID() {
|
||||
return CVRID != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public Identifier getKommunekode() {
|
||||
if (Kommunekode == null) { Kommunekode = new Identifier(); }
|
||||
return Kommunekode;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setKommunekode(Identifier value) {
|
||||
this.Kommunekode = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasKommunekode() {
|
||||
return Kommunekode != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public Identifier getRegionskode() {
|
||||
if (Regionskode == null) { Regionskode = new Identifier(); }
|
||||
return Regionskode;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setRegionskode(Identifier value) {
|
||||
this.Regionskode = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasRegionskode() {
|
||||
return Regionskode != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public ProducentId getProducentID() {
|
||||
if (ProducentID == null) { ProducentID = new ProducentId(); }
|
||||
return ProducentID;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setProducentID(ProducentId value) {
|
||||
this.ProducentID = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasProducentID() {
|
||||
return ProducentID != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setName(String value) {
|
||||
this.name = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasName() {
|
||||
return name != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public List<ContactPoint> getTelecoms() {
|
||||
if (telecoms == null) { telecoms = new ArrayList<>(); }
|
||||
return telecoms;
|
||||
}
|
||||
|
||||
public boolean hasTelecoms() {
|
||||
return telecoms != null && !telecoms.isEmpty();
|
||||
}
|
||||
|
||||
public ContactPoint addTelecom() {
|
||||
ContactPoint theThing = new ContactPoint();
|
||||
getTelecoms().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasTelecom(ContactPoint item) {
|
||||
return hasTelecoms() && telecoms.contains(item);
|
||||
}
|
||||
|
||||
public void removeTelecom(ContactPoint item) {
|
||||
if (hasTelecom(item)) {
|
||||
telecoms.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public List<Address> getAddresses() {
|
||||
if (addresses == null) { addresses = new ArrayList<>(); }
|
||||
return addresses;
|
||||
}
|
||||
|
||||
public boolean hasAddresses() {
|
||||
return addresses != null && !addresses.isEmpty();
|
||||
}
|
||||
|
||||
public Address addAddress() {
|
||||
Address theThing = new Address();
|
||||
getAddresses().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasAddress(Address item) {
|
||||
return hasAddresses() && addresses.contains(item);
|
||||
}
|
||||
|
||||
public void removeAddress(Address item) {
|
||||
if (hasAddress(item)) {
|
||||
addresses.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public Reference getPartOf() {
|
||||
if (partOf == null) { partOf = new Reference(); }
|
||||
return partOf;
|
||||
}
|
||||
|
||||
public DkCoreOrganization setPartOf(Reference value) {
|
||||
this.partOf = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPartOf() {
|
||||
return partOf != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getContacts() {
|
||||
if (contacts == null) { contacts = new ArrayList<>(); }
|
||||
return contacts;
|
||||
}
|
||||
|
||||
public boolean hasContacts() {
|
||||
return contacts != null && !contacts.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasContact(BackboneElement item) {
|
||||
return hasContacts() && contacts.contains(item);
|
||||
}
|
||||
|
||||
public void removeContact(BackboneElement item) {
|
||||
if (hasContact(item)) {
|
||||
contacts.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A formally or informally recognized grouping of people or organizations formed
|
||||
* for the purpose of achieving some form of collective action. Includes
|
||||
* companies, institutions, corporations, departments, community groups, healthcare
|
||||
* practice groups, payer/insurer, etc.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getEndpoints() {
|
||||
if (endpoints == null) { endpoints = new ArrayList<>(); }
|
||||
return endpoints;
|
||||
}
|
||||
|
||||
public boolean hasEndpoints() {
|
||||
return endpoints != null && !endpoints.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addEndpoint() {
|
||||
Reference theThing = new Reference();
|
||||
getEndpoints().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasEndpoint(Reference item) {
|
||||
return hasEndpoints() && endpoints.contains(item);
|
||||
}
|
||||
|
||||
public void removeEndpoint(Reference item) {
|
||||
if (hasEndpoint(item)) {
|
||||
endpoints.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
id = null;
|
||||
extensions.clear();
|
||||
modifierExtensions.clear();
|
||||
identifiers.clear();
|
||||
EANID = null;
|
||||
SORID = null;
|
||||
KOMBITORGID = null;
|
||||
Ydernummer = null;
|
||||
CVRID = null;
|
||||
Kommunekode = null;
|
||||
Regionskode = null;
|
||||
ProducentID = null;
|
||||
name = null;
|
||||
telecoms.clear();
|
||||
addresses.clear();
|
||||
partOf = null;
|
||||
contacts.clear();
|
||||
endpoints.clear();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,743 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public class DkCorePatient extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-patient|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("")
|
||||
private String id; //
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extensions that cannot be ignored")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).")
|
||||
private List<Extension> modifierExtensions = new ArrayList<>(); // Extensions that cannot be ignored
|
||||
|
||||
@Min("1") @Max("*") @Doco("An identifier for this patient")
|
||||
@Definition("An identifier for this patient.")
|
||||
private List<Identifier> identifiers = new ArrayList<>();// @NotNull // An identifier for this patient
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] cpr-nummer, som det fremgår af CPR registeret")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private DkCoreCprIdentifier cpr; // [DA] cpr-nummer, som det fremgår af CPR registeret
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] X-eCPR, tildelt fra den nationale eCPR service")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private DkCoreXeCprIdentifier xEcpr; // [DA] X-eCPR, tildelt fra den nationale eCPR service
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] D-eCPR, decentral eCPR")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private DkCoreDeCprIdentifier dEcpr; // [DA] D-eCPR, decentral eCPR
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] Officielt navn, som det fremgår af CPR registeret")
|
||||
@Definition("A name associated with the individual.")
|
||||
private HumanName official; // [DA] Officielt navn, som det fremgår af CPR registeret
|
||||
|
||||
@Min("0") @Max("*") @Doco("A contact detail for the individual")
|
||||
@Definition("A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.")
|
||||
private List<ContactPoint> telecoms = new ArrayList<>(); // A contact detail for the individual
|
||||
|
||||
@Min("0") @Max("*") @Doco("An address for the individual")
|
||||
@Definition("An address for the individual. Danish addresses must comply with directions issued by https://dawa.aws.dk/ and underlying authorities")
|
||||
private List<Address> addresses = new ArrayList<>(); // An address for the individual
|
||||
|
||||
@Min("0") @Max("*") @Doco("Image of the patient")
|
||||
@Definition("Image of the patient.")
|
||||
private List<Attachment> photos = new ArrayList<>(); // Image of the patient
|
||||
|
||||
@Min("0") @Max("*") @Doco("A contact party (e.g. guardian, partner, friend) for the patient")
|
||||
@Definition("A contact party (e.g. guardian, partner, friend) for the patient.")
|
||||
private List<BackboneElement> contacts = new ArrayList<>(); // A contact party (e.g. guardian, partner, friend) for the patient
|
||||
|
||||
@Min("0") @Max("*") @Doco("A language which may be used to communicate with the patient about his or her health")
|
||||
@Definition("A language which may be used to communicate with the patient about his or her health.")
|
||||
private List<BackboneElement> communications = new ArrayList<>(); // A language which may be used to communicate with the patient about his or her health
|
||||
|
||||
@Min("0") @Max("*") @Doco("Patient's nominated primary care provider")
|
||||
@Definition("Patient's nominated care provider.")
|
||||
private List<Reference> generalPractitioners = new ArrayList<>(); // Patient's nominated primary care provider
|
||||
|
||||
@Min("0") @Max("*") @Doco("[DA] Praktiserende læges SOR-id på sundhedsinstistutionsniveau")
|
||||
@Definition("Patient's nominated care provider.")
|
||||
private List<Reference> referencedSORUnits = new ArrayList<>(); // [DA] Praktiserende læges SOR-id på sundhedsinstistutionsniveau
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that is the custodian of the patient record")
|
||||
@Definition("Organization that is the custodian of the patient record.")
|
||||
private Reference managingOrganization; // Organization that is the custodian of the patient record
|
||||
|
||||
@Min("0") @Max("*") @Doco("Link to another patient resource that concerns the same actual person")
|
||||
@Definition("Link to another patient resource that concerns the same actual patient.")
|
||||
private List<BackboneElement> links = new ArrayList<>(); // Link to another patient resource that concerns the same actual person
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCorePatient() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of the object, and fill out all the fixed values
|
||||
*
|
||||
*/
|
||||
public DkCorePatient(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, builder.createResource(CANONICAL_URL, false));
|
||||
load(src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public static DkCorePatient fromSource(IWorkerContext context, Patient source) {
|
||||
DkCorePatient theThing = new DkCorePatient();
|
||||
theThing.workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, source);
|
||||
theThing.load(src);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("id")) {
|
||||
id = ((IdType) src.child("id").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("modifierExtension")) {
|
||||
modifierExtensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("identifier")) {
|
||||
identifiers.add((Identifier) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("cpr")) {
|
||||
cpr = DkCoreCprIdentifier.fromSource(src.child("cpr"));
|
||||
}
|
||||
if (src.hasChild("xEcpr")) {
|
||||
xEcpr = DkCoreXeCprIdentifier.fromSource(src.child("xEcpr"));
|
||||
}
|
||||
if (src.hasChild("dEcpr")) {
|
||||
dEcpr = DkCoreDeCprIdentifier.fromSource(src.child("dEcpr"));
|
||||
}
|
||||
if (src.hasChild("official")) {
|
||||
official = (HumanName) src.child("official").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("telecom")) {
|
||||
telecoms.add((ContactPoint) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("address")) {
|
||||
addresses.add((Address) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("photo")) {
|
||||
photos.add((Attachment) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("contact")) {
|
||||
contacts.add((BackboneElement) item.asElement());
|
||||
}
|
||||
for (PEInstance item : src.children("communication")) {
|
||||
communications.add((BackboneElement) item.asElement());
|
||||
}
|
||||
for (PEInstance item : src.children("generalPractitioner")) {
|
||||
generalPractitioners.add((Reference) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("referencedSORUnit")) {
|
||||
referencedSORUnits.add((Reference) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("managingOrganization")) {
|
||||
managingOrganization = (Reference) src.child("managingOrganization").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("link")) {
|
||||
links.add((BackboneElement) item.asElement());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public Patient build(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
Patient theThing = new Patient();
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, theThing);
|
||||
save(tgt, false);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this profile class into an existing resource (overwriting anything that
|
||||
* exists in the profile)
|
||||
*
|
||||
*/
|
||||
public void save(IWorkerContext context, Patient dest, boolean nulls) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, dest);
|
||||
save(tgt, nulls);
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("id");
|
||||
if (id != null) {
|
||||
tgt.makeChild("id").data().setProperty("value", new IdType(id));
|
||||
}
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("modifierExtension");
|
||||
for (Extension item : modifierExtensions) {
|
||||
tgt.addChild("modifierExtension", item);
|
||||
}
|
||||
tgt.clear("identifier");
|
||||
for (Identifier item : identifiers) {
|
||||
tgt.addChild("identifier", item);
|
||||
}
|
||||
tgt.clear("cpr");
|
||||
if (cpr != null) {
|
||||
cpr.save(tgt.makeChild("cpr"), nulls);
|
||||
}
|
||||
tgt.clear("xEcpr");
|
||||
if (xEcpr != null) {
|
||||
xEcpr.save(tgt.makeChild("xEcpr"), nulls);
|
||||
}
|
||||
tgt.clear("dEcpr");
|
||||
if (dEcpr != null) {
|
||||
dEcpr.save(tgt.makeChild("dEcpr"), nulls);
|
||||
}
|
||||
tgt.clear("official");
|
||||
if (official != null) {
|
||||
tgt.addChild("official", official);
|
||||
}
|
||||
tgt.clear("telecom");
|
||||
for (ContactPoint item : telecoms) {
|
||||
tgt.addChild("telecom", item);
|
||||
}
|
||||
tgt.clear("address");
|
||||
for (Address item : addresses) {
|
||||
tgt.addChild("address", item);
|
||||
}
|
||||
tgt.clear("photo");
|
||||
for (Attachment item : photos) {
|
||||
tgt.addChild("photo", item);
|
||||
}
|
||||
tgt.clear("contact");
|
||||
for (BackboneElement item : contacts) {
|
||||
tgt.addChild("contact", item);
|
||||
}
|
||||
tgt.clear("communication");
|
||||
for (BackboneElement item : communications) {
|
||||
tgt.addChild("communication", item);
|
||||
}
|
||||
tgt.clear("generalPractitioner");
|
||||
for (Reference item : generalPractitioners) {
|
||||
tgt.addChild("generalPractitioner", item);
|
||||
}
|
||||
tgt.clear("referencedSORUnit");
|
||||
for (Reference item : referencedSORUnits) {
|
||||
tgt.addChild("referencedSORUnit", item);
|
||||
}
|
||||
tgt.clear("managingOrganization");
|
||||
if (managingOrganization != null) {
|
||||
tgt.addChild("managingOrganization", managingOrganization);
|
||||
}
|
||||
tgt.clear("link");
|
||||
for (BackboneElement item : links) {
|
||||
tgt.addChild("link", item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DkCorePatient setId(String value) {
|
||||
this.id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasId() {
|
||||
return id != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getModifierExtensions() {
|
||||
if (modifierExtensions == null) { modifierExtensions = new ArrayList<>(); }
|
||||
return modifierExtensions;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtensions() {
|
||||
return modifierExtensions != null && !modifierExtensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addModifierExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getModifierExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtension(Extension item) {
|
||||
return hasModifierExtensions() && modifierExtensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeModifierExtension(Extension item) {
|
||||
if (hasModifierExtension(item)) {
|
||||
modifierExtensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<Identifier> getIdentifiers() {
|
||||
if (identifiers == null) { identifiers = new ArrayList<>(); }
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public boolean hasIdentifiers() {
|
||||
return identifiers != null && !identifiers.isEmpty();
|
||||
}
|
||||
|
||||
public Identifier addIdentifier() {
|
||||
Identifier theThing = new Identifier();
|
||||
getIdentifiers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasIdentifier(Identifier item) {
|
||||
return hasIdentifiers() && identifiers.contains(item);
|
||||
}
|
||||
|
||||
public void removeIdentifier(Identifier item) {
|
||||
if (hasIdentifier(item)) {
|
||||
identifiers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public DkCoreCprIdentifier getCpr() {
|
||||
if (cpr == null) { cpr = new DkCoreCprIdentifier(); }
|
||||
return cpr;
|
||||
}
|
||||
|
||||
public DkCorePatient setCpr(DkCoreCprIdentifier value) {
|
||||
this.cpr = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasCpr() {
|
||||
return cpr != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public DkCoreXeCprIdentifier getXEcpr() {
|
||||
if (xEcpr == null) { xEcpr = new DkCoreXeCprIdentifier(); }
|
||||
return xEcpr;
|
||||
}
|
||||
|
||||
public DkCorePatient setXEcpr(DkCoreXeCprIdentifier value) {
|
||||
this.xEcpr = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasXEcpr() {
|
||||
return xEcpr != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public DkCoreDeCprIdentifier getDEcpr() {
|
||||
if (dEcpr == null) { dEcpr = new DkCoreDeCprIdentifier(); }
|
||||
return dEcpr;
|
||||
}
|
||||
|
||||
public DkCorePatient setDEcpr(DkCoreDeCprIdentifier value) {
|
||||
this.dEcpr = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasDEcpr() {
|
||||
return dEcpr != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public HumanName getOfficial() {
|
||||
if (official == null) { official = new HumanName(); }
|
||||
return official;
|
||||
}
|
||||
|
||||
public DkCorePatient setOfficial(HumanName value) {
|
||||
this.official = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasOfficial() {
|
||||
return official != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<ContactPoint> getTelecoms() {
|
||||
if (telecoms == null) { telecoms = new ArrayList<>(); }
|
||||
return telecoms;
|
||||
}
|
||||
|
||||
public boolean hasTelecoms() {
|
||||
return telecoms != null && !telecoms.isEmpty();
|
||||
}
|
||||
|
||||
public ContactPoint addTelecom() {
|
||||
ContactPoint theThing = new ContactPoint();
|
||||
getTelecoms().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasTelecom(ContactPoint item) {
|
||||
return hasTelecoms() && telecoms.contains(item);
|
||||
}
|
||||
|
||||
public void removeTelecom(ContactPoint item) {
|
||||
if (hasTelecom(item)) {
|
||||
telecoms.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<Address> getAddresses() {
|
||||
if (addresses == null) { addresses = new ArrayList<>(); }
|
||||
return addresses;
|
||||
}
|
||||
|
||||
public boolean hasAddresses() {
|
||||
return addresses != null && !addresses.isEmpty();
|
||||
}
|
||||
|
||||
public Address addAddress() {
|
||||
Address theThing = new Address();
|
||||
getAddresses().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasAddress(Address item) {
|
||||
return hasAddresses() && addresses.contains(item);
|
||||
}
|
||||
|
||||
public void removeAddress(Address item) {
|
||||
if (hasAddress(item)) {
|
||||
addresses.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<Attachment> getPhotos() {
|
||||
if (photos == null) { photos = new ArrayList<>(); }
|
||||
return photos;
|
||||
}
|
||||
|
||||
public boolean hasPhotos() {
|
||||
return photos != null && !photos.isEmpty();
|
||||
}
|
||||
|
||||
public Attachment addPhoto() {
|
||||
Attachment theThing = new Attachment();
|
||||
getPhotos().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasPhoto(Attachment item) {
|
||||
return hasPhotos() && photos.contains(item);
|
||||
}
|
||||
|
||||
public void removePhoto(Attachment item) {
|
||||
if (hasPhoto(item)) {
|
||||
photos.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getContacts() {
|
||||
if (contacts == null) { contacts = new ArrayList<>(); }
|
||||
return contacts;
|
||||
}
|
||||
|
||||
public boolean hasContacts() {
|
||||
return contacts != null && !contacts.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasContact(BackboneElement item) {
|
||||
return hasContacts() && contacts.contains(item);
|
||||
}
|
||||
|
||||
public void removeContact(BackboneElement item) {
|
||||
if (hasContact(item)) {
|
||||
contacts.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getCommunications() {
|
||||
if (communications == null) { communications = new ArrayList<>(); }
|
||||
return communications;
|
||||
}
|
||||
|
||||
public boolean hasCommunications() {
|
||||
return communications != null && !communications.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasCommunication(BackboneElement item) {
|
||||
return hasCommunications() && communications.contains(item);
|
||||
}
|
||||
|
||||
public void removeCommunication(BackboneElement item) {
|
||||
if (hasCommunication(item)) {
|
||||
communications.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getGeneralPractitioners() {
|
||||
if (generalPractitioners == null) { generalPractitioners = new ArrayList<>(); }
|
||||
return generalPractitioners;
|
||||
}
|
||||
|
||||
public boolean hasGeneralPractitioners() {
|
||||
return generalPractitioners != null && !generalPractitioners.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addGeneralPractitioner() {
|
||||
Reference theThing = new Reference();
|
||||
getGeneralPractitioners().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasGeneralPractitioner(Reference item) {
|
||||
return hasGeneralPractitioners() && generalPractitioners.contains(item);
|
||||
}
|
||||
|
||||
public void removeGeneralPractitioner(Reference item) {
|
||||
if (hasGeneralPractitioner(item)) {
|
||||
generalPractitioners.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<Reference> getReferencedSORUnits() {
|
||||
if (referencedSORUnits == null) { referencedSORUnits = new ArrayList<>(); }
|
||||
return referencedSORUnits;
|
||||
}
|
||||
|
||||
public boolean hasReferencedSORUnits() {
|
||||
return referencedSORUnits != null && !referencedSORUnits.isEmpty();
|
||||
}
|
||||
|
||||
public Reference addReferencedSORUnit() {
|
||||
Reference theThing = new Reference();
|
||||
getReferencedSORUnits().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasReferencedSORUnit(Reference item) {
|
||||
return hasReferencedSORUnits() && referencedSORUnits.contains(item);
|
||||
}
|
||||
|
||||
public void removeReferencedSORUnit(Reference item) {
|
||||
if (hasReferencedSORUnit(item)) {
|
||||
referencedSORUnits.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public Reference getManagingOrganization() {
|
||||
if (managingOrganization == null) { managingOrganization = new Reference(); }
|
||||
return managingOrganization;
|
||||
}
|
||||
|
||||
public DkCorePatient setManagingOrganization(Reference value) {
|
||||
this.managingOrganization = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasManagingOrganization() {
|
||||
return managingOrganization != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Demographics and other administrative information about an individual or animal
|
||||
* receiving care or other health-related services.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getLinks() {
|
||||
if (links == null) { links = new ArrayList<>(); }
|
||||
return links;
|
||||
}
|
||||
|
||||
public boolean hasLinks() {
|
||||
return links != null && !links.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasLink(BackboneElement item) {
|
||||
return hasLinks() && links.contains(item);
|
||||
}
|
||||
|
||||
public void removeLink(BackboneElement item) {
|
||||
if (hasLink(item)) {
|
||||
links.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
id = null;
|
||||
extensions.clear();
|
||||
modifierExtensions.clear();
|
||||
identifiers.clear();
|
||||
cpr = null;
|
||||
xEcpr = null;
|
||||
dEcpr = null;
|
||||
official = null;
|
||||
telecoms.clear();
|
||||
addresses.clear();
|
||||
photos.clear();
|
||||
contacts.clear();
|
||||
communications.clear();
|
||||
generalPractitioners.clear();
|
||||
referencedSORUnits.clear();
|
||||
managingOrganization = null;
|
||||
links.clear();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,419 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public class DkCorePractitioner extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-practitioner|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("")
|
||||
private String id; //
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extensions that cannot be ignored")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).")
|
||||
private List<Extension> modifierExtensions = new ArrayList<>(); // Extensions that cannot be ignored
|
||||
|
||||
@Min("0") @Max("*") @Doco("An identifier for the person as this agent")
|
||||
@Definition("An identifier that applies to this person in this role.")
|
||||
private List<Identifier> identifiers = new ArrayList<>(); // An identifier for the person as this agent
|
||||
|
||||
@Min("0") @Max("*") @Doco("A contact detail for the practitioner (that apply to all roles)")
|
||||
@Definition("A contact detail for the practitioner, e.g. a telephone number or an email address.")
|
||||
private List<ContactPoint> telecoms = new ArrayList<>(); // A contact detail for the practitioner (that apply to all roles)
|
||||
|
||||
@Min("0") @Max("*") @Doco("Image of the person")
|
||||
@Definition("Image of the person.")
|
||||
private List<Attachment> photos = new ArrayList<>(); // Image of the person
|
||||
|
||||
@Min("0") @Max("*") @Doco("Certification, licenses, or training pertaining to the provision of care")
|
||||
@Definition("The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.")
|
||||
private List<BackboneElement> qualifications = new ArrayList<>(); // Certification, licenses, or training pertaining to the provision of care
|
||||
|
||||
@Min("0") @Max("1") @Doco("Certification, licenses, or training pertaining to the provision of care")
|
||||
@Definition("The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.")
|
||||
private BackboneElement officialHealthAuthorization; // Certification, licenses, or training pertaining to the provision of care
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCorePractitioner() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of the object, and fill out all the fixed values
|
||||
*
|
||||
*/
|
||||
public DkCorePractitioner(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, builder.createResource(CANONICAL_URL, false));
|
||||
load(src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public static DkCorePractitioner fromSource(IWorkerContext context, Practitioner source) {
|
||||
DkCorePractitioner theThing = new DkCorePractitioner();
|
||||
theThing.workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, source);
|
||||
theThing.load(src);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("id")) {
|
||||
id = ((IdType) src.child("id").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("modifierExtension")) {
|
||||
modifierExtensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("identifier")) {
|
||||
identifiers.add((Identifier) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("telecom")) {
|
||||
telecoms.add((ContactPoint) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("photo")) {
|
||||
photos.add((Attachment) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("qualification")) {
|
||||
qualifications.add((BackboneElement) item.asElement());
|
||||
}
|
||||
if (src.hasChild("officialHealthAuthorization")) {
|
||||
officialHealthAuthorization = (BackboneElement) src.child("officialHealthAuthorization").asElement();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public Practitioner build(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
Practitioner theThing = new Practitioner();
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, theThing);
|
||||
save(tgt, false);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this profile class into an existing resource (overwriting anything that
|
||||
* exists in the profile)
|
||||
*
|
||||
*/
|
||||
public void save(IWorkerContext context, Practitioner dest, boolean nulls) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, dest);
|
||||
save(tgt, nulls);
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("id");
|
||||
if (id != null) {
|
||||
tgt.makeChild("id").data().setProperty("value", new IdType(id));
|
||||
}
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("modifierExtension");
|
||||
for (Extension item : modifierExtensions) {
|
||||
tgt.addChild("modifierExtension", item);
|
||||
}
|
||||
tgt.clear("identifier");
|
||||
for (Identifier item : identifiers) {
|
||||
tgt.addChild("identifier", item);
|
||||
}
|
||||
tgt.clear("telecom");
|
||||
for (ContactPoint item : telecoms) {
|
||||
tgt.addChild("telecom", item);
|
||||
}
|
||||
tgt.clear("photo");
|
||||
for (Attachment item : photos) {
|
||||
tgt.addChild("photo", item);
|
||||
}
|
||||
tgt.clear("qualification");
|
||||
for (BackboneElement item : qualifications) {
|
||||
tgt.addChild("qualification", item);
|
||||
}
|
||||
tgt.clear("officialHealthAuthorization");
|
||||
if (officialHealthAuthorization != null) {
|
||||
tgt.addChild("officialHealthAuthorization", officialHealthAuthorization);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DkCorePractitioner setId(String value) {
|
||||
this.id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasId() {
|
||||
return id != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getModifierExtensions() {
|
||||
if (modifierExtensions == null) { modifierExtensions = new ArrayList<>(); }
|
||||
return modifierExtensions;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtensions() {
|
||||
return modifierExtensions != null && !modifierExtensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addModifierExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getModifierExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtension(Extension item) {
|
||||
return hasModifierExtensions() && modifierExtensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeModifierExtension(Extension item) {
|
||||
if (hasModifierExtension(item)) {
|
||||
modifierExtensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public List<Identifier> getIdentifiers() {
|
||||
if (identifiers == null) { identifiers = new ArrayList<>(); }
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public boolean hasIdentifiers() {
|
||||
return identifiers != null && !identifiers.isEmpty();
|
||||
}
|
||||
|
||||
public Identifier addIdentifier() {
|
||||
Identifier theThing = new Identifier();
|
||||
getIdentifiers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasIdentifier(Identifier item) {
|
||||
return hasIdentifiers() && identifiers.contains(item);
|
||||
}
|
||||
|
||||
public void removeIdentifier(Identifier item) {
|
||||
if (hasIdentifier(item)) {
|
||||
identifiers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public List<ContactPoint> getTelecoms() {
|
||||
if (telecoms == null) { telecoms = new ArrayList<>(); }
|
||||
return telecoms;
|
||||
}
|
||||
|
||||
public boolean hasTelecoms() {
|
||||
return telecoms != null && !telecoms.isEmpty();
|
||||
}
|
||||
|
||||
public ContactPoint addTelecom() {
|
||||
ContactPoint theThing = new ContactPoint();
|
||||
getTelecoms().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasTelecom(ContactPoint item) {
|
||||
return hasTelecoms() && telecoms.contains(item);
|
||||
}
|
||||
|
||||
public void removeTelecom(ContactPoint item) {
|
||||
if (hasTelecom(item)) {
|
||||
telecoms.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public List<Attachment> getPhotos() {
|
||||
if (photos == null) { photos = new ArrayList<>(); }
|
||||
return photos;
|
||||
}
|
||||
|
||||
public boolean hasPhotos() {
|
||||
return photos != null && !photos.isEmpty();
|
||||
}
|
||||
|
||||
public Attachment addPhoto() {
|
||||
Attachment theThing = new Attachment();
|
||||
getPhotos().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasPhoto(Attachment item) {
|
||||
return hasPhotos() && photos.contains(item);
|
||||
}
|
||||
|
||||
public void removePhoto(Attachment item) {
|
||||
if (hasPhoto(item)) {
|
||||
photos.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getQualifications() {
|
||||
if (qualifications == null) { qualifications = new ArrayList<>(); }
|
||||
return qualifications;
|
||||
}
|
||||
|
||||
public boolean hasQualifications() {
|
||||
return qualifications != null && !qualifications.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasQualification(BackboneElement item) {
|
||||
return hasQualifications() && qualifications.contains(item);
|
||||
}
|
||||
|
||||
public void removeQualification(BackboneElement item) {
|
||||
if (hasQualification(item)) {
|
||||
qualifications.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A person who is directly or indirectly involved in the provisioning of
|
||||
* healthcare.
|
||||
*
|
||||
*/
|
||||
public @Nullable BackboneElement getOfficialHealthAuthorization() { // BackboneElement is abstract
|
||||
return officialHealthAuthorization;
|
||||
}
|
||||
|
||||
public DkCorePractitioner setOfficialHealthAuthorization(BackboneElement value) {
|
||||
this.officialHealthAuthorization = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasOfficialHealthAuthorization() {
|
||||
return officialHealthAuthorization != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
id = null;
|
||||
extensions.clear();
|
||||
modifierExtensions.clear();
|
||||
identifiers.clear();
|
||||
telecoms.clear();
|
||||
photos.clear();
|
||||
qualifications.clear();
|
||||
officialHealthAuthorization = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,584 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public class DkCoreRelatedPerson extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-related-person|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("")
|
||||
private String id; //
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("0") @Max("*") @Doco("Extensions that cannot be ignored")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).")
|
||||
private List<Extension> modifierExtensions = new ArrayList<>(); // Extensions that cannot be ignored
|
||||
|
||||
@Min("0") @Max("*") @Doco("A human identifier for this person")
|
||||
@Definition("Identifier for a person within a particular scope.")
|
||||
private List<Identifier> identifiers = new ArrayList<>(); // A human identifier for this person
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] cpr-nummer, som det fremgår af CPR registeret")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private DkCoreCprIdentifier cpr; // [DA] cpr-nummer, som det fremgår af CPR registeret
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] X-eCPR, tildelt fra den nationale eCPR service")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private DkCoreXeCprIdentifier xEcpr; // [DA] X-eCPR, tildelt fra den nationale eCPR service
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] D-eCPR, decentral eCPR")
|
||||
@Definition("An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.")
|
||||
private DkCoreDeCprIdentifier dEcpr; // [DA] D-eCPR, decentral eCPR
|
||||
|
||||
@Min("1") @Max("1") @Doco("The patient this person is related to")
|
||||
@Definition("The patient this person is related to.")
|
||||
private Reference patient;// @NotNull // The patient this person is related to
|
||||
|
||||
@Min("0") @Max("1") @Doco("[DA] Officielt navn, som det fremgår af CPR registeret")
|
||||
@Definition("A name associated with the person.")
|
||||
private HumanName official; // [DA] Officielt navn, som det fremgår af CPR registeret
|
||||
|
||||
@Min("0") @Max("*") @Doco("A contact detail for the person")
|
||||
@Definition("A contact detail for the person, e.g. a telephone number or an email address.")
|
||||
private List<ContactPoint> telecoms = new ArrayList<>(); // A contact detail for the person
|
||||
|
||||
@Min("0") @Max("*") @Doco("Image of the person")
|
||||
@Definition("Image of the person.")
|
||||
private List<Attachment> photos = new ArrayList<>(); // Image of the person
|
||||
|
||||
@Min("0") @Max("1") @Doco("Period of time that this relationship is considered valid")
|
||||
@Definition("The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.")
|
||||
private Period period; // Period of time that this relationship is considered valid
|
||||
|
||||
@Min("0") @Max("*") @Doco("A language which may be used to communicate with about the patient's health")
|
||||
@Definition("A language which may be used to communicate with about the patient's health.")
|
||||
private List<BackboneElement> communications = new ArrayList<>(); // A language which may be used to communicate with about the patient's health
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreRelatedPerson() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of the object, and fill out all the fixed values
|
||||
*
|
||||
*/
|
||||
public DkCoreRelatedPerson(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, builder.createResource(CANONICAL_URL, false));
|
||||
load(src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public static DkCoreRelatedPerson fromSource(IWorkerContext context, RelatedPerson source) {
|
||||
DkCoreRelatedPerson theThing = new DkCoreRelatedPerson();
|
||||
theThing.workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance src = builder.buildPEInstance(CANONICAL_URL, source);
|
||||
theThing.load(src);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("id")) {
|
||||
id = ((IdType) src.child("id").asDataType()).getValue();
|
||||
}
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("modifierExtension")) {
|
||||
modifierExtensions.add((Extension) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("identifier")) {
|
||||
identifiers.add((Identifier) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("cpr")) {
|
||||
cpr = DkCoreCprIdentifier.fromSource(src.child("cpr"));
|
||||
}
|
||||
if (src.hasChild("xEcpr")) {
|
||||
xEcpr = DkCoreXeCprIdentifier.fromSource(src.child("xEcpr"));
|
||||
}
|
||||
if (src.hasChild("dEcpr")) {
|
||||
dEcpr = DkCoreDeCprIdentifier.fromSource(src.child("dEcpr"));
|
||||
}
|
||||
if (src.hasChild("patient")) {
|
||||
patient = (Reference) src.child("patient").asDataType();
|
||||
}
|
||||
if (src.hasChild("official")) {
|
||||
official = (HumanName) src.child("official").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("telecom")) {
|
||||
telecoms.add((ContactPoint) item.asDataType());
|
||||
}
|
||||
for (PEInstance item : src.children("photo")) {
|
||||
photos.add((Attachment) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
for (PEInstance item : src.children("communication")) {
|
||||
communications.add((BackboneElement) item.asElement());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an instance of the object based on this source object
|
||||
*
|
||||
*/
|
||||
public RelatedPerson build(IWorkerContext context) {
|
||||
workerContext = context;
|
||||
RelatedPerson theThing = new RelatedPerson();
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, theThing);
|
||||
save(tgt, false);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this profile class into an existing resource (overwriting anything that
|
||||
* exists in the profile)
|
||||
*
|
||||
*/
|
||||
public void save(IWorkerContext context, RelatedPerson dest, boolean nulls) {
|
||||
workerContext = context;
|
||||
PEBuilder builder = new PEBuilder(context, PEElementPropertiesPolicy.EXTENSION, true);
|
||||
PEInstance tgt = builder.buildPEInstance(CANONICAL_URL, dest);
|
||||
save(tgt, nulls);
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("id");
|
||||
if (id != null) {
|
||||
tgt.makeChild("id").data().setProperty("value", new IdType(id));
|
||||
}
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("modifierExtension");
|
||||
for (Extension item : modifierExtensions) {
|
||||
tgt.addChild("modifierExtension", item);
|
||||
}
|
||||
tgt.clear("identifier");
|
||||
for (Identifier item : identifiers) {
|
||||
tgt.addChild("identifier", item);
|
||||
}
|
||||
tgt.clear("cpr");
|
||||
if (cpr != null) {
|
||||
cpr.save(tgt.makeChild("cpr"), nulls);
|
||||
}
|
||||
tgt.clear("xEcpr");
|
||||
if (xEcpr != null) {
|
||||
xEcpr.save(tgt.makeChild("xEcpr"), nulls);
|
||||
}
|
||||
tgt.clear("dEcpr");
|
||||
if (dEcpr != null) {
|
||||
dEcpr.save(tgt.makeChild("dEcpr"), nulls);
|
||||
}
|
||||
tgt.clear("patient");
|
||||
if (patient != null) {
|
||||
tgt.addChild("patient", patient);
|
||||
}
|
||||
tgt.clear("official");
|
||||
if (official != null) {
|
||||
tgt.addChild("official", official);
|
||||
}
|
||||
tgt.clear("telecom");
|
||||
for (ContactPoint item : telecoms) {
|
||||
tgt.addChild("telecom", item);
|
||||
}
|
||||
tgt.clear("photo");
|
||||
for (Attachment item : photos) {
|
||||
tgt.addChild("photo", item);
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("communication");
|
||||
for (BackboneElement item : communications) {
|
||||
tgt.addChild("communication", item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DkCoreRelatedPerson setId(String value) {
|
||||
this.id = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasId() {
|
||||
return id != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getModifierExtensions() {
|
||||
if (modifierExtensions == null) { modifierExtensions = new ArrayList<>(); }
|
||||
return modifierExtensions;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtensions() {
|
||||
return modifierExtensions != null && !modifierExtensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addModifierExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getModifierExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasModifierExtension(Extension item) {
|
||||
return hasModifierExtensions() && modifierExtensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeModifierExtension(Extension item) {
|
||||
if (hasModifierExtension(item)) {
|
||||
modifierExtensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public List<Identifier> getIdentifiers() {
|
||||
if (identifiers == null) { identifiers = new ArrayList<>(); }
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public boolean hasIdentifiers() {
|
||||
return identifiers != null && !identifiers.isEmpty();
|
||||
}
|
||||
|
||||
public Identifier addIdentifier() {
|
||||
Identifier theThing = new Identifier();
|
||||
getIdentifiers().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasIdentifier(Identifier item) {
|
||||
return hasIdentifiers() && identifiers.contains(item);
|
||||
}
|
||||
|
||||
public void removeIdentifier(Identifier item) {
|
||||
if (hasIdentifier(item)) {
|
||||
identifiers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public DkCoreCprIdentifier getCpr() {
|
||||
if (cpr == null) { cpr = new DkCoreCprIdentifier(); }
|
||||
return cpr;
|
||||
}
|
||||
|
||||
public DkCoreRelatedPerson setCpr(DkCoreCprIdentifier value) {
|
||||
this.cpr = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasCpr() {
|
||||
return cpr != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public DkCoreXeCprIdentifier getXEcpr() {
|
||||
if (xEcpr == null) { xEcpr = new DkCoreXeCprIdentifier(); }
|
||||
return xEcpr;
|
||||
}
|
||||
|
||||
public DkCoreRelatedPerson setXEcpr(DkCoreXeCprIdentifier value) {
|
||||
this.xEcpr = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasXEcpr() {
|
||||
return xEcpr != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public DkCoreDeCprIdentifier getDEcpr() {
|
||||
if (dEcpr == null) { dEcpr = new DkCoreDeCprIdentifier(); }
|
||||
return dEcpr;
|
||||
}
|
||||
|
||||
public DkCoreRelatedPerson setDEcpr(DkCoreDeCprIdentifier value) {
|
||||
this.dEcpr = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasDEcpr() {
|
||||
return dEcpr != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public Reference getPatient() {
|
||||
if (patient == null) { patient = new Reference(); }
|
||||
return patient;
|
||||
}
|
||||
|
||||
public DkCoreRelatedPerson setPatient(Reference value) {
|
||||
this.patient = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPatient() {
|
||||
return patient != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public HumanName getOfficial() {
|
||||
if (official == null) { official = new HumanName(); }
|
||||
return official;
|
||||
}
|
||||
|
||||
public DkCoreRelatedPerson setOfficial(HumanName value) {
|
||||
this.official = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasOfficial() {
|
||||
return official != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public List<ContactPoint> getTelecoms() {
|
||||
if (telecoms == null) { telecoms = new ArrayList<>(); }
|
||||
return telecoms;
|
||||
}
|
||||
|
||||
public boolean hasTelecoms() {
|
||||
return telecoms != null && !telecoms.isEmpty();
|
||||
}
|
||||
|
||||
public ContactPoint addTelecom() {
|
||||
ContactPoint theThing = new ContactPoint();
|
||||
getTelecoms().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasTelecom(ContactPoint item) {
|
||||
return hasTelecoms() && telecoms.contains(item);
|
||||
}
|
||||
|
||||
public void removeTelecom(ContactPoint item) {
|
||||
if (hasTelecom(item)) {
|
||||
telecoms.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public List<Attachment> getPhotos() {
|
||||
if (photos == null) { photos = new ArrayList<>(); }
|
||||
return photos;
|
||||
}
|
||||
|
||||
public boolean hasPhotos() {
|
||||
return photos != null && !photos.isEmpty();
|
||||
}
|
||||
|
||||
public Attachment addPhoto() {
|
||||
Attachment theThing = new Attachment();
|
||||
getPhotos().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasPhoto(Attachment item) {
|
||||
return hasPhotos() && photos.contains(item);
|
||||
}
|
||||
|
||||
public void removePhoto(Attachment item) {
|
||||
if (hasPhoto(item)) {
|
||||
photos.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public DkCoreRelatedPerson setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about a person that is involved in the care for a patient, but who
|
||||
* is not the target of healthcare, nor has a formal responsibility in the care
|
||||
* process.
|
||||
*
|
||||
*/
|
||||
public List<BackboneElement> getCommunications() {
|
||||
if (communications == null) { communications = new ArrayList<>(); }
|
||||
return communications;
|
||||
}
|
||||
|
||||
public boolean hasCommunications() {
|
||||
return communications != null && !communications.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasCommunication(BackboneElement item) {
|
||||
return hasCommunications() && communications.contains(item);
|
||||
}
|
||||
|
||||
public void removeCommunication(BackboneElement item) {
|
||||
if (hasCommunication(item)) {
|
||||
communications.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
id = null;
|
||||
extensions.clear();
|
||||
modifierExtensions.clear();
|
||||
identifiers.clear();
|
||||
cpr = null;
|
||||
xEcpr = null;
|
||||
dEcpr = null;
|
||||
patient = null;
|
||||
official = null;
|
||||
telecoms.clear();
|
||||
photos.clear();
|
||||
period = null;
|
||||
communications.clear();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class DkCoreXeCprIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-x-ecpr-identifier|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public DkCoreXeCprIdentifier() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static DkCoreXeCprIdentifier fromSource(PEInstance source) {
|
||||
DkCoreXeCprIdentifier theThing = new DkCoreXeCprIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "urn:oid:1.2.208.176.1.6.1.1";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public DkCoreXeCprIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public DkCoreXeCprIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public DkCoreXeCprIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class GLNIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-gln-identifier|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public GLNIdentifier() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static GLNIdentifier fromSource(PEInstance source) {
|
||||
GLNIdentifier theThing = new GLNIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "https://www.gs1.org/gln";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public GLNIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public GLNIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public GLNIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class KombitOrgIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-kombit-org-identifier|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public KombitOrgIdentifier() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static KombitOrgIdentifier fromSource(PEInstance source) {
|
||||
KombitOrgIdentifier theThing = new KombitOrgIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "https://kombit.dk/sts/organisation";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public KombitOrgIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public KombitOrgIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public KombitOrgIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Identifier holding the official identifier for a danish municipality
|
||||
*
|
||||
*/
|
||||
public class MunicipalityCodes extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-municipalityCodes|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("Value of extension")
|
||||
@Definition("Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).")
|
||||
private CodeableConcept value; // Value of extension
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public MunicipalityCodes() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static MunicipalityCodes fromSource(PEInstance source) {
|
||||
MunicipalityCodes theThing = new MunicipalityCodes();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("value")) {
|
||||
value = (CodeableConcept) src.child("value").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.addChild("value", value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier holding the official identifier for a danish municipality
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getValue() {
|
||||
if (value == null) { value = new CodeableConcept(); }
|
||||
return value;
|
||||
}
|
||||
|
||||
public MunicipalityCodes setValue(CodeableConcept value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
value = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Extension for the date where a condition lost focus in a specific clinical
|
||||
* context
|
||||
*
|
||||
*/
|
||||
public class NotFollowedAnymore extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/NotFollowedAnymore|3.2.0";
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public NotFollowedAnymore() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static NotFollowedAnymore fromSource(PEInstance source) {
|
||||
NotFollowedAnymore theThing = new NotFollowedAnymore();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class ProducentId extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-producent-id|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public ProducentId() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static ProducentId fromSource(PEInstance source) {
|
||||
ProducentId theThing = new ProducentId();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "http://medcomfhir.dk/ig/terminology/CodeSystem/MedComProducentID";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public ProducentId setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public ProducentId setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public ProducentId setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* Identifier holding the official organization identifier for a danish region
|
||||
*
|
||||
*/
|
||||
public class RegionalSubDivisionCodes extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-RegionalSubDivisionCodes|3.2.0";
|
||||
|
||||
@Min("0") @Max("1") @Doco("Value of extension")
|
||||
@Definition("Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).")
|
||||
private CodeableConcept value; // Value of extension
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public RegionalSubDivisionCodes() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static RegionalSubDivisionCodes fromSource(PEInstance source) {
|
||||
RegionalSubDivisionCodes theThing = new RegionalSubDivisionCodes();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
if (src.hasChild("value")) {
|
||||
value = (CodeableConcept) src.child("value").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.addChild("value", value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier holding the official organization identifier for a danish region
|
||||
*
|
||||
*/
|
||||
public CodeableConcept getValue() {
|
||||
if (value == null) { value = new CodeableConcept(); }
|
||||
return value;
|
||||
}
|
||||
|
||||
public RegionalSubDivisionCodes setValue(CodeableConcept value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
value = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package org.hl7.fhir.r5.test.profiles;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.*;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||
import org.hl7.fhir.r5.profilemodel.PEInstance;
|
||||
import org.hl7.fhir.r5.profilemodel.PEBuilder.PEElementPropertiesPolicy;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.PEGeneratedBase;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Min;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Max;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Label;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Doco;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.BindingStrength;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.ValueSet;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.MustSupport;
|
||||
import org.hl7.fhir.r5.profilemodel.gen.Definition;
|
||||
|
||||
|
||||
// Generated by the HAPI Java Profile Generator, 28/10/24, 7:31 am
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public class SORIdentifier extends PEGeneratedBase {
|
||||
|
||||
private static final String CANONICAL_URL = "http://hl7.dk/fhir/core/StructureDefinition/dk-core-sor-identifier|3.2.0";
|
||||
|
||||
@Min("0") @Max("*") @Doco("Additional content defined by implementations")
|
||||
@Definition("May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.")
|
||||
private List<Extension> extensions = new ArrayList<>(); // Additional content defined by implementations
|
||||
|
||||
@Min("1") @Max("1") @Doco("The namespace for the identifier value")
|
||||
@Definition("Establishes the namespace for the value - that is, a URL that describes a set values that are unique.")
|
||||
private String system;// @NotNull // The namespace for the identifier value
|
||||
|
||||
@Min("1") @Max("1") @Doco("The value that is unique")
|
||||
@Definition("The portion of the identifier typically relevant to the user and which is unique within the context of the system.")
|
||||
private String value;// @NotNull // The value that is unique
|
||||
|
||||
@Min("0") @Max("1") @Doco("Time period when id is/was valid for use")
|
||||
@Definition("Time period during which identifier is/was valid for use.")
|
||||
private Period period; // Time period when id is/was valid for use
|
||||
|
||||
@Min("0") @Max("1") @Doco("Organization that issued id (may be just text)")
|
||||
@Definition("Organization that issued/manages the identifier.")
|
||||
private Reference assigner; // Organization that issued id (may be just text)
|
||||
|
||||
|
||||
/**
|
||||
* Parameter-less constructor.
|
||||
*
|
||||
*/
|
||||
public SORIdentifier() {
|
||||
initFixedValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used when loading other models
|
||||
*
|
||||
*/
|
||||
public static SORIdentifier fromSource(PEInstance source) {
|
||||
SORIdentifier theThing = new SORIdentifier();
|
||||
theThing.workerContext = source.getContext();
|
||||
theThing.load(source);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public void load(PEInstance src) {
|
||||
clear();
|
||||
for (PEInstance item : src.children("extension")) {
|
||||
extensions.add((Extension) item.asDataType());
|
||||
}
|
||||
if (src.hasChild("system")) {
|
||||
system = ((UriType) src.child("system").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("value")) {
|
||||
value = ((StringType) src.child("value").asDataType()).getValue();
|
||||
}
|
||||
if (src.hasChild("period")) {
|
||||
period = (Period) src.child("period").asDataType();
|
||||
}
|
||||
if (src.hasChild("assigner")) {
|
||||
assigner = (Reference) src.child("assigner").asDataType();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void save(PEInstance tgt, boolean nulls) {
|
||||
tgt.clear("extension");
|
||||
for (Extension item : extensions) {
|
||||
tgt.addChild("extension", item);
|
||||
}
|
||||
tgt.clear("system");
|
||||
if (system != null) {
|
||||
tgt.makeChild("system").data().setProperty("value", new UriType(system));
|
||||
}
|
||||
tgt.clear("value");
|
||||
if (value != null) {
|
||||
tgt.makeChild("value").data().setProperty("value", new StringType(value));
|
||||
}
|
||||
tgt.clear("period");
|
||||
if (period != null) {
|
||||
tgt.addChild("period", period);
|
||||
}
|
||||
tgt.clear("assigner");
|
||||
if (assigner != null) {
|
||||
tgt.addChild("assigner", assigner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initFixedValues() {
|
||||
system = "urn:oid:1.2.208.176.1.1";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public List<Extension> getExtensions() {
|
||||
if (extensions == null) { extensions = new ArrayList<>(); }
|
||||
return extensions;
|
||||
}
|
||||
|
||||
public boolean hasExtensions() {
|
||||
return extensions != null && !extensions.isEmpty();
|
||||
}
|
||||
|
||||
public Extension addExtension() {
|
||||
Extension theThing = new Extension();
|
||||
getExtensions().add(theThing);
|
||||
return theThing;
|
||||
}
|
||||
|
||||
public boolean hasExtension(Extension item) {
|
||||
return hasExtensions() && extensions.contains(item);
|
||||
}
|
||||
|
||||
public void removeExtension(Extension item) {
|
||||
if (hasExtension(item)) {
|
||||
extensions.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
public boolean hasSystem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public SORIdentifier setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean hasValue() {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Period getPeriod() {
|
||||
if (period == null) { period = new Period(); }
|
||||
return period;
|
||||
}
|
||||
|
||||
public SORIdentifier setPeriod(Period value) {
|
||||
this.period = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasPeriod() {
|
||||
return period != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier - identifies some entity uniquely and unambiguously. Typically
|
||||
* this is used for business identifiers.
|
||||
*
|
||||
*/
|
||||
public Reference getAssigner() {
|
||||
if (assigner == null) { assigner = new Reference(); }
|
||||
return assigner;
|
||||
}
|
||||
|
||||
public SORIdentifier setAssigner(Reference value) {
|
||||
this.assigner = value;
|
||||
return this;
|
||||
}
|
||||
public boolean hasAssigner() {
|
||||
return assigner != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
extensions.clear();
|
||||
system = null;
|
||||
value = null;
|
||||
period = null;
|
||||
assigner = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user