Sync to 1.0.0 FHIR definitions

This commit is contained in:
jamesagnew 2015-09-03 08:07:43 -04:00
parent 875ad3b5f9
commit 8b20f3a77d
1103 changed files with 366256 additions and 579858 deletions

View File

@ -129,7 +129,7 @@ class SchemaBaseValidator implements IValidatorModule {
ourLog.debug("Going to load resource: {}", pathToBase);
InputStream baseIs = FhirValidator.class.getResourceAsStream(pathToBase);
if (baseIs == null) {
throw new InternalErrorException("No FHIR-BASE schema found");
throw new InternalErrorException("Schema not found. " + SchematronBaseValidator.RESOURCES_JAR_NOTE);
}
baseIs = new BOMInputStream(baseIs, false);
InputStreamReader baseReader = new InputStreamReader(baseIs, Charset.forName("UTF-8"));

View File

@ -46,6 +46,7 @@ import com.phloc.schematron.xslt.SchematronResourceSCH;
public class SchematronBaseValidator implements IValidatorModule {
static final String RESOURCES_JAR_NOTE = "Note that as of HAPI FHIR 1.2, DSTU2 validation files are kept in a separate JAR (hapi-fhir-validation-resources-XXX.jar) which must be added to your classpath. See the HAPI FHIR download page for more information.";
private Map<Class<? extends IBaseResource>, ISchematronResource> myClassToSchematron = new HashMap<Class<? extends IBaseResource>, ISchematronResource>();
private FhirContext myCtx;
@ -125,7 +126,7 @@ public class SchematronBaseValidator implements IValidatorModule {
InputStream baseIs = FhirValidator.class.getResourceAsStream(pathToBase);
try {
if (baseIs == null) {
throw new InternalErrorException("No schematron found for resource type: " + theCtx.getFhirContext().getResourceDefinition(theCtx.getResource()).getBaseDefinition().getImplementingClass().getCanonicalName());
throw new InternalErrorException("Failed to load schematron for resource '" + theCtx.getFhirContext().getResourceDefinition(theCtx.getResource()).getBaseDefinition().getName() + "'. " + RESOURCES_JAR_NOTE);
}
} finally {
IOUtils.closeQuietly(baseIs);

View File

@ -11,7 +11,7 @@
<artifactId>hapi-fhir-structures-dstu2</artifactId>
<packaging>jar</packaging>
<name>HAPI FHIR Structures - DSTU2 (FHIR v0.5.0)</name>
<name>HAPI FHIR Structures - DSTU2 (FHIR v1.0.0)</name>
<dependencies>
<dependency>
@ -20,6 +20,13 @@
<version>1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
<version>1.2-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
@ -31,7 +38,6 @@
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>${xmlunit_version}</version>
<scope>test</scope>
</dependency>
<dependency>
@ -167,9 +173,9 @@
<baseResourceName>condition</baseResourceName>
<baseResourceName>conformance</baseResourceName>
<baseResourceName>contract</baseResourceName>
<baseResourceName>contraindication</baseResourceName>
<baseResourceName>coverage</baseResourceName>
<baseResourceName>dataelement</baseResourceName>
<baseResourceName>detectedissue</baseResourceName>
<baseResourceName>device</baseResourceName>
<baseResourceName>devicecomponent</baseResourceName>
<baseResourceName>devicemetric</baseResourceName>
@ -180,7 +186,6 @@
<baseResourceName>documentation</baseResourceName>
<baseResourceName>documentmanifest</baseResourceName>
<baseResourceName>documentreference</baseResourceName>
<!--<baseResourceName>domainresource</baseResourceName>-->
<baseResourceName>eligibilityrequest</baseResourceName>
<baseResourceName>eligibilityresponse</baseResourceName>
<baseResourceName>encounter</baseResourceName>
@ -225,16 +230,13 @@
<baseResourceName>procedurerequest</baseResourceName>
<baseResourceName>processrequest</baseResourceName>
<baseResourceName>processresponse</baseResourceName>
<!--<baseResourceName>protocol</baseResourceName>-->
<baseResourceName>provenance</baseResourceName>
<baseResourceName>questionnaire</baseResourceName>
<baseResourceName>questionnaireresponse</baseResourceName>
<baseResourceName>referralrequest</baseResourceName>
<baseResourceName>relatedperson</baseResourceName>
<baseResourceName>remittance</baseResourceName>
<!--<baseResourceName>resource</baseResourceName>-->
<baseResourceName>riskassessment</baseResourceName>
<baseResourceName>schedule</baseResourceName>
<baseResourceName>searchparameter</baseResourceName>
<baseResourceName>slot</baseResourceName>
@ -245,7 +247,6 @@
<baseResourceName>supplydelivery</baseResourceName>
<baseResourceName>supplyrequest</baseResourceName>
<baseResourceName>supportingdocumentation</baseResourceName>
<!--<baseResourceName>template</baseResourceName>-->
<baseResourceName>test</baseResourceName>
<baseResourceName>testscript</baseResourceName>
<baseResourceName>user</baseResourceName>

View File

@ -102,7 +102,7 @@ public class FhirDstu2 implements IFhirVersion {
@Override
public String getPathToSchemaDefinitions() {
return "/ca/uhn/fhir/model/dstu2/schema";
return "/org/hl7/fhir/instance/model/schema";
}
@Override

View File

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource CarePlan
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>CarePlan</sch:title>
<sch:rule context="//f:CarePlan">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:patient">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:author">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:concern">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:support">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:participant/f:member">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:goal">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:actionResulting">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:reference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail">
<sch:assert test="not(exists(f:detail)) or not(exists(f:simple))">cpl-3: Only provide a detail reference, or a simple detail summary</sch:assert>
<sch:assert test="(f:category/@value=('supply')) = exists(f:quantity)">cpl-2: Quantity can only be specified if activity category is supply</sch:assert>
<sch:assert test="(f:category/@value=('drug','diet')) = exists(f:dailyAmount)">cpl-1: DailyDose can only be specified if activity category is drug or food</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:reasonReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:goal">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat">
<sch:assert test="not(exists(f:periodMax)) or exists(period)">tim-6: If there's a periodMax, there must be a period</sch:assert>
<sch:assert test="not(exists(f:durationMax)) or exists(duration)">tim-7: If there's a durationMax, there must be a duration</sch:assert>
<sch:assert test="not(exists(f:duration)) or exists(f:durationUnits)">tim-1: if there's a duration, there needs to be duration units</sch:assert>
<sch:assert test="not(exists(f:period)) or exists(f:periodUnits)">tim-2: if there's a period, there needs to be duration units</sch:assert>
<sch:assert test="not(exists(f:frequency)) or not(exists(f:when))">tim-3: Either frequency or when can exist, not both</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat/f:boundsDuration">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat/f:boundsRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat/f:boundsRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat/f:boundsRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat/f:boundsPeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat/f:duration">
<sch:assert test="@value &gt;= 0 or not(@value)">tim-4: duration SHALL be a non-negative value</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledTiming/f:repeat/f:period">
<sch:assert test="@value &gt;= 0 or not(@value)">tim-5: period SHALL be a non-negative value</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:scheduledPeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:location">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:product">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:dailyAmount">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:CarePlan/f:activity/f:detail/f:quantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Observation</sch:title>
<sch:rule context="f:Cholesterol">
<sch:assert test="count(f:referenceRange) &gt;= 1">referenceRange: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol">
<sch:assert test="count(f:referenceRange) &lt;= 1">referenceRange: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol">
<sch:assert test="count(f:related) &lt;= 0">related: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Observation.valueQuantity</sch:title>
<sch:rule context="f:Cholesterol/f:valueQuantity">
<sch:assert test="count(f:comparator) &lt;= 0">comparator: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol/f:valueQuantity">
<sch:assert test="count(f:unit) &gt;= 1">unit: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol/f:valueQuantity">
<sch:assert test="count(f:system) &gt;= 1">system: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol/f:valueQuantity">
<sch:assert test="count(f:code) &gt;= 1">code: minimum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Observation.referenceRange</sch:title>
<sch:rule context="f:Cholesterol/f:referenceRange">
<sch:assert test="count(f:low) &lt;= 0">low: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol/f:referenceRange">
<sch:assert test="count(f:high) &gt;= 1">high: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol/f:referenceRange">
<sch:assert test="count(f:meaning) &lt;= 0">meaning: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:Cholesterol/f:referenceRange">
<sch:assert test="count(f:age) &lt;= 0">age: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource Communication
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Communication</sch:title>
<sch:rule context="//f:Communication">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:sender">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:recipient">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:payload/f:contentAttachment">
<sch:assert test="not(exists(f:data)) or exists(f:contentType)">att-1: It the Attachment has data, it SHALL have a contentType</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:payload/f:contentReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Communication/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Contract</sch:title>
<sch:rule context="f:ConsentDirective">
<sch:assert test="count(f:valuedItem) &lt;= 0">valuedItem: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:ConsentDirective">
<sch:assert test="count(f:binding[x]) &gt;= 1">binding[x]: minimum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Contract.term</sch:title>
<sch:rule context="f:ConsentDirective/f:term">
<sch:assert test="count(f:valuedItem) &lt;= 0">valuedItem: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Observation</sch:title>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:subject) &gt;= 1">subject: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:encounter) &lt;= 0">encounter: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:effectiveDateTime) &gt;= 1">effectiveDateTime: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:issued) &lt;= 0">issued: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:dataAbsentReason) &lt;= 0">dataAbsentReason: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:specimen) &lt;= 0">specimen: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:device) &gt;= 1">device: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:referenceRange) &lt;= 1">referenceRange: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:DeviceMetricObservation">
<sch:assert test="count(f:related) &lt;= 1">related: maximum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Observation</sch:title>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Genetics">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource Goal
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Goal</sch:title>
<sch:rule context="//f:Goal">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:Goal/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:Goal/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Goal/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Goal/f:patient">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Goal/f:author">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Goal/f:concern">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Goal/f:outcome/f:resultReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Observation</sch:title>
<sch:rule context="f:HDLCholesterol">
<sch:assert test="count(f:referenceRange) &gt;= 1">referenceRange: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:HDLCholesterol">
<sch:assert test="count(f:referenceRange) &lt;= 1">referenceRange: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:HDLCholesterol">
<sch:assert test="count(f:related) &lt;= 0">related: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Observation.referenceRange</sch:title>
<sch:rule context="f:HDLCholesterol/f:referenceRange">
<sch:assert test="count(f:low) &gt;= 1">low: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:HDLCholesterol/f:referenceRange">
<sch:assert test="count(f:high) &lt;= 0">high: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:HDLCholesterol/f:referenceRange">
<sch:assert test="count(f:meaning) &lt;= 0">meaning: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:HDLCholesterol/f:referenceRange">
<sch:assert test="count(f:age) &lt;= 0">age: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource Immunization
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Immunization</sch:title>
<sch:rule context="//f:Immunization">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:patient">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:wasNotGiven">
<sch:assert test="not(f:wasNotGiven/@value='false' and exists(f:explanation/f:reasonNotGiven))">imm-2: If immunization was administered (wasNotGiven=false) then explanation.reasonNotGiven SHALL be absent.</sch:assert>
<sch:assert test="not(f:wasNotGiven/@value='true' and (count(f:reaction) &gt; 0 or exists(f:explanation/reason)))">imm-1: If immunization was not administred (wasNotGiven=true) then there SHALL be no reaction nor explanation.reason present</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:requester">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:manufacturer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:location">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:doseQuantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:reaction/f:detail">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Immunization/f:vaccinationProtocol/f:authority">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Observation</sch:title>
<sch:rule context="f:LDLCholesterol">
<sch:assert test="count(f:extension) &lt;= 1">extension: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LDLCholesterol">
<sch:assert test="count(f:referenceRange) &gt;= 1">referenceRange: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LDLCholesterol">
<sch:assert test="count(f:referenceRange) &lt;= 1">referenceRange: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LDLCholesterol">
<sch:assert test="count(f:related) &lt;= 0">related: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Observation.referenceRange</sch:title>
<sch:rule context="f:LDLCholesterol/f:referenceRange">
<sch:assert test="count(f:low) &lt;= 0">low: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:LDLCholesterol/f:referenceRange">
<sch:assert test="count(f:high) &gt;= 1">high: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LDLCholesterol/f:referenceRange">
<sch:assert test="count(f:meaning) &lt;= 0">meaning: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:LDLCholesterol/f:referenceRange">
<sch:assert test="count(f:age) &lt;= 0">age: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>DiagnosticReport</sch:title>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:result) &gt;= 1">result: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:result) &lt;= 1">result: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:result) &gt;= 1">result: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:result) &lt;= 1">result: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:result) &gt;= 1">result: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:result) &lt;= 1">result: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:result) &lt;= 1">result: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:LipidProfile">
<sch:assert test="count(f:codedDiagnosis) &lt;= 0">codedDiagnosis: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Composition</sch:title>
<sch:rule context="f:MeasureReport">
<sch:assert test="count(f:confidentiality) &gt;= 1">confidentiality: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:MeasureReport">
<sch:assert test="count(f:event) &lt;= 0">event: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:MeasureReport">
<sch:assert test="count(f:encounter) &lt;= 0">encounter: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Composition.event</sch:title>
<sch:rule context="f:MeasureReport/f:event">
<sch:assert test="count(f:code) &lt;= 0">code: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:MeasureReport/f:event">
<sch:assert test="count(f:period) &lt;= 0">period: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:MeasureReport/f:event">
<sch:assert test="count(f:detail) &lt;= 0">detail: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Composition.section</sch:title>
<sch:rule context="f:MeasureReport/f:section">
<sch:assert test="count(f:entry) &gt;= 1">entry: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:MeasureReport/f:section">
<sch:assert test="count(f:entry) &lt;= 1">entry: maximum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,134 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource MedicationStatement
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>MedicationStatement</sch:title>
<sch:rule context="//f:MedicationStatement">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:patient">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:informationSource">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:reasonNotTaken">
<sch:assert test="not(exists(f:reasonNotTaken) and f:wasNotTaken/@value='false')">mst-1: Reason not taken is only permitted if wasNotTaken is true</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:reasonForUseCodeableConcept">
<sch:assert test="not(exists(f:reasonForUse[x]) and f:wasNotTaken/@value='true')">mst-2: Reason for use is only permitted if wasNotTaken is false</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:reasonForUseReference">
<sch:assert test="not(exists(f:reasonForUse[x]) and f:wasNotTaken/@value='true')">mst-2: Reason for use is only permitted if wasNotTaken is false</sch:assert>
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:effectivePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:supportingInformation">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:medicationReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat">
<sch:assert test="not(exists(f:periodMax)) or exists(period)">tim-6: If there's a periodMax, there must be a period</sch:assert>
<sch:assert test="not(exists(f:durationMax)) or exists(duration)">tim-7: If there's a durationMax, there must be a duration</sch:assert>
<sch:assert test="not(exists(f:duration)) or exists(f:durationUnits)">tim-1: if there's a duration, there needs to be duration units</sch:assert>
<sch:assert test="not(exists(f:period)) or exists(f:periodUnits)">tim-2: if there's a period, there needs to be duration units</sch:assert>
<sch:assert test="not(exists(f:frequency)) or not(exists(f:when))">tim-3: Either frequency or when can exist, not both</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat/f:boundsDuration">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat/f:boundsRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat/f:boundsRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat/f:boundsRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat/f:boundsPeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat/f:duration">
<sch:assert test="@value &gt;= 0 or not(@value)">tim-4: duration SHALL be a non-negative value</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:timing/f:repeat/f:period">
<sch:assert test="@value &gt;= 0 or not(@value)">tim-5: period SHALL be a non-negative value</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:siteReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:quantitySimpleQuantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:quantityRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:quantityRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:quantityRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:rateRatio">
<sch:assert test="(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) &gt; 0) or (count(f:extension) &gt; 0))">rat-1: numerator and denominator SHALL both be present, or both be absent. If both are absent, there SHALL be some extension present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:rateRatio/f:numerator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:rateRatio/f:denominator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:rateRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:rateRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:rateRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:maxDosePerPeriod">
<sch:assert test="(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) &gt; 0) or (count(f:extension) &gt; 0))">rat-1: numerator and denominator SHALL both be present, or both be absent. If both are absent, there SHALL be some extension present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:maxDosePerPeriod/f:numerator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:MedicationStatement/f:dosage/f:maxDosePerPeriod/f:denominator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource Observation
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Observation</sch:title>
<sch:rule context="//f:Observation">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
<sch:assert test="not(exists(f:component.code/@value)) or (f:code/@value != f:component/f:code/@value)">obs-7: Component code Shall not be same as observation code</sch:assert>
<sch:assert test="not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))">obs-6: Shall only be present if Observation.value[x] is not present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:effectivePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueQuantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueRatio">
<sch:assert test="(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) &gt; 0) or (count(f:extension) &gt; 0))">rat-1: numerator and denominator SHALL both be present, or both be absent. If both are absent, there SHALL be some extension present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueRatio/f:numerator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueRatio/f:denominator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueSampledData/f:origin">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valueAttachment">
<sch:assert test="not(exists(f:data)) or exists(f:contentType)">att-1: It the Attachment has data, it SHALL have a contentType</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:valuePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:specimen">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:device">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:referenceRange">
<sch:assert test="(exists(f:low) or exists(f:high)or exists(f:text))">obs-3: Must have at least a low or a high or text</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:referenceRange/f:low">
<sch:assert test="not(exists(f:comparator)) or boolean(f:comparator/@value = '&lt;') or boolean(f:comparator/@value = '&lt;=')">obs-4: Low range comparators can only be '&gt;' or '&gt;=' or empty</sch:assert>
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:referenceRange/f:high">
<sch:assert test="not(exists(f:comparator)) or boolean(f:comparator/@value = '&gt;') or boolean(f:comparator/@value = '&gt;=')">obs-5: High range comparators can only be '&lt;' or '&lt;=' or empty</sch:assert>
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:referenceRange/f:age">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:referenceRange/f:age/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:referenceRange/f:age/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:related/f:target">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueQuantity">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueRatio">
<sch:assert test="(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) &gt; 0) or (count(f:extension) &gt; 0))">rat-1: numerator and denominator SHALL both be present, or both be absent. If both are absent, there SHALL be some extension present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueRatio/f:numerator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueRatio/f:denominator">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueSampledData/f:origin">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valueAttachment">
<sch:assert test="not(exists(f:data)) or exists(f:contentType)">att-1: It the Attachment has data, it SHALL have a contentType</sch:assert>
</sch:rule>
<sch:rule context="//f:Observation/f:component/f:valuePeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource Procedure
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Procedure</sch:title>
<sch:rule context="//f:Procedure">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:patient">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:reasonNotPerformed">
<sch:assert test="not(exists(f:reasonNotPerformed) and f:notPerformed/@value='false')">pro-1: Reason not performed is only permitted if notPerformed indicator is true</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:bodySite/f:siteReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:reasonReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:performer/f:individual">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:performedPeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:location">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:report">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:request">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:focalDevice/f:manipulated">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Procedure/f:used">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource ProcedureRequest
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>ProcedureRequest</sch:title>
<sch:rule context="//f:ProcedureRequest">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:bodySite/f:siteReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:reasonReference">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingPeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat">
<sch:assert test="not(exists(f:periodMax)) or exists(period)">tim-6: If there's a periodMax, there must be a period</sch:assert>
<sch:assert test="not(exists(f:durationMax)) or exists(duration)">tim-7: If there's a durationMax, there must be a duration</sch:assert>
<sch:assert test="not(exists(f:duration)) or exists(f:durationUnits)">tim-1: if there's a duration, there needs to be duration units</sch:assert>
<sch:assert test="not(exists(f:period)) or exists(f:periodUnits)">tim-2: if there's a period, there needs to be duration units</sch:assert>
<sch:assert test="not(exists(f:frequency)) or not(exists(f:when))">tim-3: Either frequency or when can exist, not both</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat/f:boundsDuration">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat/f:boundsRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat/f:boundsRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat/f:boundsRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat/f:boundsPeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat/f:duration">
<sch:assert test="@value &gt;= 0 or not(@value)">tim-4: duration SHALL be a non-negative value</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:timingTiming/f:repeat/f:period">
<sch:assert test="@value &gt;= 0 or not(@value)">tim-5: period SHALL be a non-negative value</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:encounter">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:ProcedureRequest/f:orderer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource Questionnaire
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Questionnaire</sch:title>
<sch:rule context="//f:Questionnaire">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
<sch:assert test="not(exists(lloyd-fix-me)) or (f:group/f:required/@value='true')">que-3: If root, group must be 'required'</sch:assert>
<sch:assert test="count(descendant::f:linkId/@value)=count(distinct-values(descendant::f:linkId/@value))">que-2: The link ids for groups and questions must be unique within the questionnaire</sch:assert>
</sch:rule>
<sch:rule context="//f:Questionnaire/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:Questionnaire/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Questionnaire/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:Questionnaire/f:telecom">
<sch:assert test="not(exists(f:value)) or exists(f:system)">cpt-2: A system is required if a value is provided.</sch:assert>
</sch:rule>
<sch:rule context="//f:Questionnaire/f:telecom/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:Questionnaire/f:group">
<sch:assert test="not(exists(f:group) and exists(f:question))">que-1: Groups may either contain questions or groups but not both</sch:assert>
</sch:rule>
<sch:rule context="//f:Questionnaire/f:group/f:question/f:options">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource RiskAssessment
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>RiskAssessment</sch:title>
<sch:rule context="//f:RiskAssessment">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:condition">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:performer">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:basis">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:probabilityDecimal">
<sch:assert test="@value &lt;= 100">ras-2: Must be &lt;= 100</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:probabilityRange">
<sch:assert test="(not(f:low) or f:low[f:code/@value='%' and f:system/@value='http://unitsofmeasure.org']) and (not(f:high) or f:high[f:code/@value='%' and f:system/@value='http://unitsofmeasure.org'])">ras-1: low and high must be percentages, if present</sch:assert>
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:probabilityRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:probabilityRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:whenPeriod">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:whenRange">
<sch:assert test="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) &lt;= number(f:high/f:value/@value))">rng-2: If present, low SHALL have a lower value than high</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:whenRange/f:low">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
<sch:rule context="//f:RiskAssessment/f:prediction/f:whenRange/f:high">
<sch:assert test="not(exists(f:code)) or exists(f:system)">qty-3: If a code for the units is present, the system SHALL also be present</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource TestScript
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="//f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>TestScript</sch:title>
<sch:rule context="//f:TestScript">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(parent::f:contained and f:text)">dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative</sch:assert>
<sch:assert test="not(exists(f:contained/f:meta/f:versionId)) and not(exists(f:contained/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource</sch:assert>
<sch:assert test="not(f:assert)">inv-16: Assertions SHALL be present in TestScript.setup.action and TestScript.test.action only.</sch:assert>
<sch:assert test="not(f:operation)">inv-15: Operations SHALL be present in TestScript.setup.action, TestScript.test.action and TestScript.teardown.action only.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:text/f:div">
<sch:assert test="not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-3: The narrative SHALL contain only the basic html formatting attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))])">txt-1: The narrative SHALL contain only the basic html formatting elements described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:contact/f:telecom">
<sch:assert test="not(exists(f:value)) or exists(f:system)">cpt-2: A system is required if a value is provided.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:contact/f:telecom/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:metadata">
<sch:assert test="f:capabilities/f:required or f:capabilities/f:validated or (f:capabilities/f:required and f:capabilities/f:validated)">inv-5: TestScript metadata capabilities SHALL contain required or validated or both.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:metadata/f:capabilities/f:conformance">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:fixture/f:resource">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:profile">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:variable">
<sch:assert test="not(f:headerField and f:path)">inv-4: Variable cannot contain both headerField and path.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:setup/f:metadata">
<sch:assert test="f:capabilities/f:required or f:capabilities/f:validated or (f:capabilities/f:required and f:capabilities/f:validated)">inv-6: Setup metadata capabilities SHALL contain required or validated or both.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:setup/f:action">
<sch:assert test="(f:operation or f:assert) and not(f:operation and f:assert)">inv-1: Setup action SHALL contain either an operation or assert but not both.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:setup/f:action/f:operation">
<sch:assert test="f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')">inv-10: Setup operation SHALL contain either sourceId or targetId or params or url.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:setup/f:action/f:assert">
<sch:assert test="count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:validateProfileId) &lt;=1">inv-8: Only a single assertion SHALL be present within setup action assert element.</sch:assert>
<sch:assert test="(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)">inv-13: Setup action assert shall contain both compareToSourceId and compareToSourcePath or neither.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:test/f:metadata">
<sch:assert test="f:capabilities/f:required or f:capabilities/f:validated or (f:capabilities/f:required and f:capabilities/f:validated)">inv-7: Test metadata capabilities SHALL contain required or validated or both.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:test/f:action">
<sch:assert test="(f:operation or f:assert) and not(f:operation and f:assert)">inv-2: Test action SHALL contain either an operation or assert but not both.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:test/f:action/f:operation">
<sch:assert test="f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')">inv-11: Test operation SHALL contain either sourceId or targetId or params or url.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:test/f:action/f:assert">
<sch:assert test="count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:validateProfileId) &lt;=1">inv-9: Only a single assertion SHALL be present within test action assert element.</sch:assert>
<sch:assert test="(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)">inv-14: Test action assert shall contain both compareToSourceId and compareToSourcePath or neither.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:teardown/f:action">
<sch:assert test="f:operation">inv-3: Teardown action SHALL contain an operation.</sch:assert>
</sch:rule>
<sch:rule context="//f:TestScript/f:teardown/f:action/f:operation">
<sch:assert test="f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')">inv-12: Teardown operation SHALL contain either sourceId or targetId or params or url.</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Observation</sch:title>
<sch:rule context="f:Triglyceride">
<sch:assert test="count(f:referenceRange) &gt;= 1">referenceRange: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Triglyceride">
<sch:assert test="count(f:referenceRange) &lt;= 1">referenceRange: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Triglyceride">
<sch:assert test="count(f:related) &lt;= 0">related: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Observation.referenceRange</sch:title>
<sch:rule context="f:Triglyceride/f:referenceRange">
<sch:assert test="count(f:low) &lt;= 0">low: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:Triglyceride/f:referenceRange">
<sch:assert test="count(f:high) &gt;= 1">high: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:Triglyceride/f:referenceRange">
<sch:assert test="count(f:meaning) &lt;= 0">meaning: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:Triglyceride/f:referenceRange">
<sch:assert test="count(f:age) &lt;= 0">age: maximum cardinality is 0</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>DocumentManifest</sch:title>
<sch:rule context="f:XDSDocumentManifest">
<sch:assert test="count(f:identifier) &gt;= 1">identifier: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentManifest">
<sch:assert test="count(f:identifier) &lt;= 1">identifier: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentManifest">
<sch:assert test="count(f:subject) &gt;= 1">subject: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentManifest">
<sch:assert test="count(f:author) &gt;= 1">author: minimum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -1,83 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>DocumentReference</sch:title>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:masterIdentifier) &gt;= 1">masterIdentifier: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:subject) &gt;= 1">subject: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:class) &gt;= 1">class: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:format) &gt;= 1">format: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:format) &lt;= 1">format: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:author) &gt;= 1">author: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:custodian) &lt;= 0">custodian: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:created) &gt;= 1">created: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:docStatus) &lt;= 0">docStatus: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:securityLabel) &gt;= 1">securityLabel: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference">
<sch:assert test="count(f:securityLabel) &lt;= 1">securityLabel: maximum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>DocumentReference.content</sch:title>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:id) &lt;= 1">id: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:contentType) &gt;= 1">contentType: minimum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:contentType) &lt;= 1">contentType: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:language) &lt;= 1">language: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:data) &lt;= 1">data: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:url) &lt;= 1">url: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:size) &lt;= 1">size: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:hash) &lt;= 1">hash: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:title) &lt;= 1">title: maximum cardinality is 1</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:content">
<sch:assert test="count(f:creation) &lt;= 1">creation: maximum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>DocumentReference.context</sch:title>
<sch:rule context="f:XDSDocumentReference/f:context">
<sch:assert test="count(f:encounter) &lt;= 0">encounter: maximum cardinality is 0</sch:assert>
</sch:rule>
<sch:rule context="f:XDSDocumentReference/f:context">
<sch:assert test="count(f:period) &gt;= 1">period: minimum cardinality is 1</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>

View File

@ -553,9 +553,9 @@ public class XmlParserDstu2Test {
@Test
public void testEncodeAndReEncodeContainedJson() {
Composition comp = new Composition();
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNotes(new AnnotationDt().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNotes(new AnnotationDt().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNotes(new AnnotationDt().setText("Section2_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section2_Allergy0")));
IParser parser = ourCtx.newJsonParser().setPrettyPrint(true);
@ -578,9 +578,9 @@ public class XmlParserDstu2Test {
@Test
public void testEncodeAndReEncodeContainedXml() {
Composition comp = new Composition();
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNotes(new AnnotationDt().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNotes(new AnnotationDt().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNotes(new AnnotationDt().setText("Section2_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new AnnotationDt().setText("Section2_Allergy0")));
IParser parser = ourCtx.newXmlParser().setPrettyPrint(true);

View File

@ -437,6 +437,7 @@ public class ServerConformanceProviderDstu2Test {
rs.init(createServletConfig());
Conformance conformance = sc.getServerConformance(createHttpServletRequest());
ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformance));
ValidationResult result = ourCtx.newValidator().validateWithResult(conformance);
assertTrue(result.getMessages().toString(), result.isSuccessful());

View File

@ -269,11 +269,6 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
myCtx = theCtx;
}
@Override
public List<ConceptMap> allMaps() {
throw new UnsupportedOperationException();
}
@Override
public ValueSetExpansionComponent expandVS(ConceptSetComponent theInc) {
throw new UnsupportedOperationException();
@ -377,6 +372,11 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
return vso;
}
}
@Override
public List<ConceptMap> findMapsForSource(String theUrl) {
throw new UnsupportedOperationException();
}
}
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -688,7 +688,7 @@ public class Account extends DomainResource {
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="period", path="Account.coveragePeriod", description="Transaction window", type="date" )
public static final String SP_PERIOD = "period";
@SearchParamDefinition(name="balance", path="Account.balance", description="How much is in account?", type="number" )
@SearchParamDefinition(name="balance", path="Account.balance", description="How much is in account?", type="quantity" )
public static final String SP_BALANCE = "balance";
@SearchParamDefinition(name="subject", path="Account.subject", description="What is account tied to?", type="reference" )
public static final String SP_SUBJECT = "subject";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -276,13 +276,13 @@ public class AllergyIntolerance extends DomainResource {
public enum AllergyIntoleranceType {
/**
* Immune mediated reaction, including allergic reactions and hypersensitivities.
* Immune-mediated hypersensitivity reaction.
*/
IMMUNE,
ALLERGY,
/**
* A non-immune mediated reaction, which can include pseudoallergic reactions, side effects, intolerances, drug toxicities (eg to Gentamicin), drug-drug interactions, food-drug interactions, and drug-disease interactions.
* Adverse reaction to a substance, not judged to be immune-mediated (non-allergic). This can include (but is not limited to) pseudoallergic reactions, side effects, drug toxicities (eg to Gentamicin), drug-drug interactions, food-drug interactions, and drug-disease interactions.
*/
NONIMMUNE,
INTOLERANCE,
/**
* added to help the parsers
*/
@ -290,37 +290,37 @@ public class AllergyIntolerance extends DomainResource {
public static AllergyIntoleranceType fromCode(String codeString) throws Exception {
if (codeString == null || "".equals(codeString))
return null;
if ("immune".equals(codeString))
return IMMUNE;
if ("non-immune".equals(codeString))
return NONIMMUNE;
if ("allergy".equals(codeString))
return ALLERGY;
if ("intolerance".equals(codeString))
return INTOLERANCE;
throw new Exception("Unknown AllergyIntoleranceType code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case IMMUNE: return "immune";
case NONIMMUNE: return "non-immune";
case ALLERGY: return "allergy";
case INTOLERANCE: return "intolerance";
default: return "?";
}
}
public String getSystem() {
switch (this) {
case IMMUNE: return "http://hl7.org/fhir/allergy-intolerance-type";
case NONIMMUNE: return "http://hl7.org/fhir/allergy-intolerance-type";
case ALLERGY: return "http://hl7.org/fhir/allergy-intolerance-type";
case INTOLERANCE: return "http://hl7.org/fhir/allergy-intolerance-type";
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case IMMUNE: return "Immune mediated reaction, including allergic reactions and hypersensitivities.";
case NONIMMUNE: return "A non-immune mediated reaction, which can include pseudoallergic reactions, side effects, intolerances, drug toxicities (eg to Gentamicin), drug-drug interactions, food-drug interactions, and drug-disease interactions.";
case ALLERGY: return "Immune-mediated hypersensitivity reaction.";
case INTOLERANCE: return "Adverse reaction to a substance, not judged to be immune-mediated (non-allergic). This can include (but is not limited to) pseudoallergic reactions, side effects, drug toxicities (eg to Gentamicin), drug-drug interactions, food-drug interactions, and drug-disease interactions.";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case IMMUNE: return "Immune Mediated";
case NONIMMUNE: return "Non-immune mediated";
case ALLERGY: return "Allergy";
case INTOLERANCE: return "Intolerance";
default: return "?";
}
}
@ -331,17 +331,17 @@ public class AllergyIntolerance extends DomainResource {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("immune".equals(codeString))
return AllergyIntoleranceType.IMMUNE;
if ("non-immune".equals(codeString))
return AllergyIntoleranceType.NONIMMUNE;
if ("allergy".equals(codeString))
return AllergyIntoleranceType.ALLERGY;
if ("intolerance".equals(codeString))
return AllergyIntoleranceType.INTOLERANCE;
throw new IllegalArgumentException("Unknown AllergyIntoleranceType code '"+codeString+"'");
}
public String toCode(AllergyIntoleranceType code) {
if (code == AllergyIntoleranceType.IMMUNE)
return "immune";
if (code == AllergyIntoleranceType.NONIMMUNE)
return "non-immune";
if (code == AllergyIntoleranceType.ALLERGY)
return "allergy";
if (code == AllergyIntoleranceType.INTOLERANCE)
return "intolerance";
return "?";
}
}
@ -672,11 +672,11 @@ public class AllergyIntolerance extends DomainResource {
/**
* Additional text about the Adverse Reaction event not captured in other fields.
*/
@Child(name = "notes", type = {Annotation.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Child(name = "note", type = {Annotation.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Text about event not captured in other fields", formalDefinition="Additional text about the Adverse Reaction event not captured in other fields." )
protected Annotation notes;
protected Annotation note;
private static final long serialVersionUID = 2035921004L;
private static final long serialVersionUID = -765664367L;
/*
* Constructor
@ -970,26 +970,26 @@ public class AllergyIntolerance extends DomainResource {
}
/**
* @return {@link #notes} (Additional text about the Adverse Reaction event not captured in other fields.)
* @return {@link #note} (Additional text about the Adverse Reaction event not captured in other fields.)
*/
public Annotation getNotes() {
if (this.notes == null)
public Annotation getNote() {
if (this.note == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.notes");
throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.note");
else if (Configuration.doAutoCreate())
this.notes = new Annotation(); // cc
return this.notes;
this.note = new Annotation(); // cc
return this.note;
}
public boolean hasNotes() {
return this.notes != null && !this.notes.isEmpty();
public boolean hasNote() {
return this.note != null && !this.note.isEmpty();
}
/**
* @param value {@link #notes} (Additional text about the Adverse Reaction event not captured in other fields.)
* @param value {@link #note} (Additional text about the Adverse Reaction event not captured in other fields.)
*/
public AllergyIntoleranceReactionComponent setNotes(Annotation value) {
this.notes = value;
public AllergyIntoleranceReactionComponent setNote(Annotation value) {
this.note = value;
return this;
}
@ -1002,7 +1002,7 @@ public class AllergyIntolerance extends DomainResource {
childrenList.add(new Property("onset", "dateTime", "Record of the date and/or time of the onset of the Reaction.", 0, java.lang.Integer.MAX_VALUE, onset));
childrenList.add(new Property("severity", "code", "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.", 0, java.lang.Integer.MAX_VALUE, severity));
childrenList.add(new Property("exposureRoute", "CodeableConcept", "Identification of the route by which the subject was exposed to the substance.", 0, java.lang.Integer.MAX_VALUE, exposureRoute));
childrenList.add(new Property("notes", "Annotation", "Additional text about the Adverse Reaction event not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, notes));
childrenList.add(new Property("note", "Annotation", "Additional text about the Adverse Reaction event not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note));
}
public AllergyIntoleranceReactionComponent copy() {
@ -1019,7 +1019,7 @@ public class AllergyIntolerance extends DomainResource {
dst.onset = onset == null ? null : onset.copy();
dst.severity = severity == null ? null : severity.copy();
dst.exposureRoute = exposureRoute == null ? null : exposureRoute.copy();
dst.notes = notes == null ? null : notes.copy();
dst.note = note == null ? null : note.copy();
return dst;
}
@ -1032,7 +1032,7 @@ public class AllergyIntolerance extends DomainResource {
AllergyIntoleranceReactionComponent o = (AllergyIntoleranceReactionComponent) other;
return compareDeep(substance, o.substance, true) && compareDeep(certainty, o.certainty, true) && compareDeep(manifestation, o.manifestation, true)
&& compareDeep(description, o.description, true) && compareDeep(onset, o.onset, true) && compareDeep(severity, o.severity, true)
&& compareDeep(exposureRoute, o.exposureRoute, true) && compareDeep(notes, o.notes, true);
&& compareDeep(exposureRoute, o.exposureRoute, true) && compareDeep(note, o.note, true);
}
@Override
@ -1050,7 +1050,7 @@ public class AllergyIntolerance extends DomainResource {
return super.isEmpty() && (substance == null || substance.isEmpty()) && (certainty == null || certainty.isEmpty())
&& (manifestation == null || manifestation.isEmpty()) && (description == null || description.isEmpty())
&& (onset == null || onset.isEmpty()) && (severity == null || severity.isEmpty()) && (exposureRoute == null || exposureRoute.isEmpty())
&& (notes == null || notes.isEmpty());
&& (note == null || note.isEmpty());
}
}
@ -1134,10 +1134,10 @@ public class AllergyIntolerance extends DomainResource {
protected Enumeration<AllergyIntoleranceCriticality> criticality;
/**
* Identification of the underlying physiological mechanism for the Reaction Risk.
* Identification of the underlying physiological mechanism for the reaction risk.
*/
@Child(name = "type", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="immune | non-immune - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the Reaction Risk." )
@Description(shortDefinition="allergy | intolerance - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the reaction risk." )
protected Enumeration<AllergyIntoleranceType> type;
/**
@ -1157,9 +1157,9 @@ public class AllergyIntolerance extends DomainResource {
/**
* Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
*/
@Child(name = "notes", type = {Annotation.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Child(name = "note", type = {Annotation.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Additional text not captured in other fields", formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." )
protected Annotation notes;
protected Annotation note;
/**
* Details about each Adverse Reaction Event linked to exposure to the identified Substance.
@ -1168,7 +1168,7 @@ public class AllergyIntolerance extends DomainResource {
@Description(shortDefinition="Adverse Reaction Events linked to exposure to substance", formalDefinition="Details about each Adverse Reaction Event linked to exposure to the identified Substance." )
protected List<AllergyIntoleranceReactionComponent> reaction;
private static final long serialVersionUID = 1887747654L;
private static final long serialVersionUID = -1657522921L;
/*
* Constructor
@ -1569,7 +1569,7 @@ public class AllergyIntolerance extends DomainResource {
}
/**
* @return {@link #type} (Identification of the underlying physiological mechanism for the Reaction Risk.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
* @return {@link #type} (Identification of the underlying physiological mechanism for the reaction risk.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
*/
public Enumeration<AllergyIntoleranceType> getTypeElement() {
if (this.type == null)
@ -1589,7 +1589,7 @@ public class AllergyIntolerance extends DomainResource {
}
/**
* @param value {@link #type} (Identification of the underlying physiological mechanism for the Reaction Risk.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
* @param value {@link #type} (Identification of the underlying physiological mechanism for the reaction risk.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
*/
public AllergyIntolerance setTypeElement(Enumeration<AllergyIntoleranceType> value) {
this.type = value;
@ -1597,14 +1597,14 @@ public class AllergyIntolerance extends DomainResource {
}
/**
* @return Identification of the underlying physiological mechanism for the Reaction Risk.
* @return Identification of the underlying physiological mechanism for the reaction risk.
*/
public AllergyIntoleranceType getType() {
return this.type == null ? null : this.type.getValue();
}
/**
* @param value Identification of the underlying physiological mechanism for the Reaction Risk.
* @param value Identification of the underlying physiological mechanism for the reaction risk.
*/
public AllergyIntolerance setType(AllergyIntoleranceType value) {
if (value == null)
@ -1716,26 +1716,26 @@ public class AllergyIntolerance extends DomainResource {
}
/**
* @return {@link #notes} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.)
* @return {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.)
*/
public Annotation getNotes() {
if (this.notes == null)
public Annotation getNote() {
if (this.note == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AllergyIntolerance.notes");
throw new Error("Attempt to auto-create AllergyIntolerance.note");
else if (Configuration.doAutoCreate())
this.notes = new Annotation(); // cc
return this.notes;
this.note = new Annotation(); // cc
return this.note;
}
public boolean hasNotes() {
return this.notes != null && !this.notes.isEmpty();
public boolean hasNote() {
return this.note != null && !this.note.isEmpty();
}
/**
* @param value {@link #notes} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.)
* @param value {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.)
*/
public AllergyIntolerance setNotes(Annotation value) {
this.notes = value;
public AllergyIntolerance setNote(Annotation value) {
this.note = value;
return this;
}
@ -1790,10 +1790,10 @@ public class AllergyIntolerance extends DomainResource {
childrenList.add(new Property("substance", "CodeableConcept", "Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk.", 0, java.lang.Integer.MAX_VALUE, substance));
childrenList.add(new Property("status", "code", "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("criticality", "code", "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, criticality));
childrenList.add(new Property("type", "code", "Identification of the underlying physiological mechanism for the Reaction Risk.", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("type", "code", "Identification of the underlying physiological mechanism for the reaction risk.", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("category", "code", "Category of the identified Substance.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("lastOccurence", "dateTime", "Represents the date and/or time of the last known occurence of a reaction event.", 0, java.lang.Integer.MAX_VALUE, lastOccurence));
childrenList.add(new Property("notes", "Annotation", "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, notes));
childrenList.add(new Property("note", "Annotation", "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note));
childrenList.add(new Property("reaction", "", "Details about each Adverse Reaction Event linked to exposure to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, reaction));
}
@ -1816,7 +1816,7 @@ public class AllergyIntolerance extends DomainResource {
dst.type = type == null ? null : type.copy();
dst.category = category == null ? null : category.copy();
dst.lastOccurence = lastOccurence == null ? null : lastOccurence.copy();
dst.notes = notes == null ? null : notes.copy();
dst.note = note == null ? null : note.copy();
if (reaction != null) {
dst.reaction = new ArrayList<AllergyIntoleranceReactionComponent>();
for (AllergyIntoleranceReactionComponent i : reaction)
@ -1840,7 +1840,7 @@ public class AllergyIntolerance extends DomainResource {
&& compareDeep(recorder, o.recorder, true) && compareDeep(patient, o.patient, true) && compareDeep(reporter, o.reporter, true)
&& compareDeep(substance, o.substance, true) && compareDeep(status, o.status, true) && compareDeep(criticality, o.criticality, true)
&& compareDeep(type, o.type, true) && compareDeep(category, o.category, true) && compareDeep(lastOccurence, o.lastOccurence, true)
&& compareDeep(notes, o.notes, true) && compareDeep(reaction, o.reaction, true);
&& compareDeep(note, o.note, true) && compareDeep(reaction, o.reaction, true);
}
@Override
@ -1861,7 +1861,7 @@ public class AllergyIntolerance extends DomainResource {
&& (patient == null || patient.isEmpty()) && (reporter == null || reporter.isEmpty()) && (substance == null || substance.isEmpty())
&& (status == null || status.isEmpty()) && (criticality == null || criticality.isEmpty())
&& (type == null || type.isEmpty()) && (category == null || category.isEmpty()) && (lastOccurence == null || lastOccurence.isEmpty())
&& (notes == null || notes.isEmpty()) && (reaction == null || reaction.isEmpty());
&& (note == null || note.isEmpty()) && (reaction == null || reaction.isEmpty());
}
@Override
@ -1885,7 +1885,7 @@ public class AllergyIntolerance extends DomainResource {
public static final String SP_CRITICALITY = "criticality";
@SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="Source of the information about the allergy", type="reference" )
public static final String SP_REPORTER = "reporter";
@SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="immune | non-immune - Underlying mechanism (if known)", type="token" )
@SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="allergy | intolerance - Underlying mechanism (if known)", type="token" )
public static final String SP_TYPE = "type";
@SearchParamDefinition(name="onset", path="AllergyIntolerance.reaction.onset", description="Date(/time) when manifestations showed", type="date" )
public static final String SP_ONSET = "onset";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -731,26 +731,14 @@ public class Appointment extends DomainResource {
@Description(shortDefinition="Additional comments about the appointment", formalDefinition="Additional comments about the appointment." )
protected StringType comment;
/**
* An Order that lead to the creation of this appointment.
*/
@Child(name = "order", type = {Order.class}, order=11, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="An Order that lead to the creation of this appointment", formalDefinition="An Order that lead to the creation of this appointment." )
protected Reference order;
/**
* The actual object that is the target of the reference (An Order that lead to the creation of this appointment.)
*/
protected Order orderTarget;
/**
* List of participants involved in the appointment.
*/
@Child(name = "participant", type = {}, order=12, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Child(name = "participant", type = {}, order=11, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="List of participants involved in the appointment", formalDefinition="List of participants involved in the appointment." )
protected List<AppointmentParticipantComponent> participant;
private static final long serialVersionUID = -17820559L;
private static final long serialVersionUID = -1403944125L;
/*
* Constructor
@ -1247,50 +1235,6 @@ public class Appointment extends DomainResource {
return this;
}
/**
* @return {@link #order} (An Order that lead to the creation of this appointment.)
*/
public Reference getOrder() {
if (this.order == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Appointment.order");
else if (Configuration.doAutoCreate())
this.order = new Reference(); // cc
return this.order;
}
public boolean hasOrder() {
return this.order != null && !this.order.isEmpty();
}
/**
* @param value {@link #order} (An Order that lead to the creation of this appointment.)
*/
public Appointment setOrder(Reference value) {
this.order = value;
return this;
}
/**
* @return {@link #order} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An Order that lead to the creation of this appointment.)
*/
public Order getOrderTarget() {
if (this.orderTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Appointment.order");
else if (Configuration.doAutoCreate())
this.orderTarget = new Order(); // aa
return this.orderTarget;
}
/**
* @param value {@link #order} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An Order that lead to the creation of this appointment.)
*/
public Appointment setOrderTarget(Order value) {
this.orderTarget = value;
return this;
}
/**
* @return {@link #participant} (List of participants involved in the appointment.)
*/
@ -1344,7 +1288,6 @@ public class Appointment extends DomainResource {
childrenList.add(new Property("minutesDuration", "positiveInt", "Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).", 0, java.lang.Integer.MAX_VALUE, minutesDuration));
childrenList.add(new Property("slot", "Reference(Slot)", "The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.", 0, java.lang.Integer.MAX_VALUE, slot));
childrenList.add(new Property("comment", "string", "Additional comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, comment));
childrenList.add(new Property("order", "Reference(Order)", "An Order that lead to the creation of this appointment.", 0, java.lang.Integer.MAX_VALUE, order));
childrenList.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant));
}
@ -1370,7 +1313,6 @@ public class Appointment extends DomainResource {
dst.slot.add(i.copy());
};
dst.comment = comment == null ? null : comment.copy();
dst.order = order == null ? null : order.copy();
if (participant != null) {
dst.participant = new ArrayList<AppointmentParticipantComponent>();
for (AppointmentParticipantComponent i : participant)
@ -1393,8 +1335,8 @@ public class Appointment extends DomainResource {
return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true)
&& compareDeep(reason, o.reason, true) && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true)
&& compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(minutesDuration, o.minutesDuration, true)
&& compareDeep(slot, o.slot, true) && compareDeep(comment, o.comment, true) && compareDeep(order, o.order, true)
&& compareDeep(participant, o.participant, true);
&& compareDeep(slot, o.slot, true) && compareDeep(comment, o.comment, true) && compareDeep(participant, o.participant, true)
;
}
@Override
@ -1414,7 +1356,7 @@ public class Appointment extends DomainResource {
&& (type == null || type.isEmpty()) && (reason == null || reason.isEmpty()) && (priority == null || priority.isEmpty())
&& (description == null || description.isEmpty()) && (start == null || start.isEmpty()) && (end == null || end.isEmpty())
&& (minutesDuration == null || minutesDuration.isEmpty()) && (slot == null || slot.isEmpty())
&& (comment == null || comment.isEmpty()) && (order == null || order.isEmpty()) && (participant == null || participant.isEmpty())
&& (comment == null || comment.isEmpty()) && (participant == null || participant.isEmpty())
;
}
@ -1427,10 +1369,12 @@ public class Appointment extends DomainResource {
public static final String SP_DATE = "date";
@SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" )
public static final String SP_ACTOR = "actor";
@SearchParamDefinition(name="partstatus", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token" )
public static final String SP_PARTSTATUS = "partstatus";
@SearchParamDefinition(name="identifier", path="Appointment.identifier", description="An Identifier of the Appointment", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="practitioner", path="Appointment.participant.actor", description="One of the individuals of the appointment is this practitioner", type="reference" )
public static final String SP_PRACTITIONER = "practitioner";
@SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token" )
public static final String SP_PARTSTATUS = "part-status";
@SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="location", path="Appointment.participant.actor", description="This location is listed in the participants of the appointment", type="reference" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -193,17 +193,31 @@ public class AppointmentResponse extends DomainResource {
*/
protected Appointment appointmentTarget;
/**
* This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.
*/
@Child(name = "start", type = {InstantType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Date/Time that the appointment is to take place, or requested new start time", formalDefinition="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time." )
protected InstantType start;
/**
* This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.
*/
@Child(name = "end", type = {InstantType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Date/Time that the appointment is to conclude, or requested new end time", formalDefinition="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time." )
protected InstantType end;
/**
* Role of participant in the appointment.
*/
@Child(name = "participantType", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "participantType", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." )
protected List<CodeableConcept> participantType;
/**
* A Person, Location/HealthcareService or Device that is participating in the appointment.
*/
@Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="A Person, Location/HealthcareService or Device that is participating in the appointment", formalDefinition="A Person, Location/HealthcareService or Device that is participating in the appointment." )
protected Reference actor;
@ -215,32 +229,18 @@ public class AppointmentResponse extends DomainResource {
/**
* Participation status of the Participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.
*/
@Child(name = "participantStatus", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true)
@Child(name = "participantStatus", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
@Description(shortDefinition="accepted | declined | tentative | in-process | completed | needs-action", formalDefinition="Participation status of the Participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty." )
protected Enumeration<ParticipantStatus> participantStatus;
/**
* This comment is particularly important when the responder is declining, tentative or requesting another time to indicate the reasons why.
*/
@Child(name = "comment", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
@Child(name = "comment", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Additional comments about the appointment", formalDefinition="This comment is particularly important when the responder is declining, tentative or requesting another time to indicate the reasons why." )
protected StringType comment;
/**
* This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.
*/
@Child(name = "start", type = {InstantType.class}, order=6, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Date/Time that the appointment is to take place, or requested new start time", formalDefinition="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time." )
protected InstantType start;
/**
* This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.
*/
@Child(name = "end", type = {InstantType.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Date/Time that the appointment is to conclude, or requested new end time", formalDefinition="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time." )
protected InstantType end;
private static final long serialVersionUID = -1858624259L;
private static final long serialVersionUID = 248548635L;
/*
* Constructor
@ -342,6 +342,104 @@ public class AppointmentResponse extends DomainResource {
return this;
}
/**
* @return {@link #start} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
*/
public InstantType getStartElement() {
if (this.start == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AppointmentResponse.start");
else if (Configuration.doAutoCreate())
this.start = new InstantType(); // bb
return this.start;
}
public boolean hasStartElement() {
return this.start != null && !this.start.isEmpty();
}
public boolean hasStart() {
return this.start != null && !this.start.isEmpty();
}
/**
* @param value {@link #start} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
*/
public AppointmentResponse setStartElement(InstantType value) {
this.start = value;
return this;
}
/**
* @return This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.
*/
public Date getStart() {
return this.start == null ? null : this.start.getValue();
}
/**
* @param value This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.
*/
public AppointmentResponse setStart(Date value) {
if (value == null)
this.start = null;
else {
if (this.start == null)
this.start = new InstantType();
this.start.setValue(value);
}
return this;
}
/**
* @return {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
*/
public InstantType getEndElement() {
if (this.end == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AppointmentResponse.end");
else if (Configuration.doAutoCreate())
this.end = new InstantType(); // bb
return this.end;
}
public boolean hasEndElement() {
return this.end != null && !this.end.isEmpty();
}
public boolean hasEnd() {
return this.end != null && !this.end.isEmpty();
}
/**
* @param value {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
*/
public AppointmentResponse setEndElement(InstantType value) {
this.end = value;
return this;
}
/**
* @return This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.
*/
public Date getEnd() {
return this.end == null ? null : this.end.getValue();
}
/**
* @param value This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.
*/
public AppointmentResponse setEnd(Date value) {
if (value == null)
this.end = null;
else {
if (this.end == null)
this.end = new InstantType();
this.end.setValue(value);
}
return this;
}
/**
* @return {@link #participantType} (Role of participant in the appointment.)
*/
@ -515,114 +613,16 @@ public class AppointmentResponse extends DomainResource {
return this;
}
/**
* @return {@link #start} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
*/
public InstantType getStartElement() {
if (this.start == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AppointmentResponse.start");
else if (Configuration.doAutoCreate())
this.start = new InstantType(); // bb
return this.start;
}
public boolean hasStartElement() {
return this.start != null && !this.start.isEmpty();
}
public boolean hasStart() {
return this.start != null && !this.start.isEmpty();
}
/**
* @param value {@link #start} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
*/
public AppointmentResponse setStartElement(InstantType value) {
this.start = value;
return this;
}
/**
* @return This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.
*/
public Date getStart() {
return this.start == null ? null : this.start.getValue();
}
/**
* @param value This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.
*/
public AppointmentResponse setStart(Date value) {
if (value == null)
this.start = null;
else {
if (this.start == null)
this.start = new InstantType();
this.start.setValue(value);
}
return this;
}
/**
* @return {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
*/
public InstantType getEndElement() {
if (this.end == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AppointmentResponse.end");
else if (Configuration.doAutoCreate())
this.end = new InstantType(); // bb
return this.end;
}
public boolean hasEndElement() {
return this.end != null && !this.end.isEmpty();
}
public boolean hasEnd() {
return this.end != null && !this.end.isEmpty();
}
/**
* @param value {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
*/
public AppointmentResponse setEndElement(InstantType value) {
this.end = value;
return this;
}
/**
* @return This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.
*/
public Date getEnd() {
return this.end == null ? null : this.end.getValue();
}
/**
* @param value This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.
*/
public AppointmentResponse setEnd(Date value) {
if (value == null)
this.end = null;
else {
if (this.end == null)
this.end = new InstantType();
this.end.setValue(value);
}
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this appointment response concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("appointment", "Reference(Appointment)", "Parent appointment that this response is replying to.", 0, java.lang.Integer.MAX_VALUE, appointment));
childrenList.add(new Property("start", "instant", "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.", 0, java.lang.Integer.MAX_VALUE, start));
childrenList.add(new Property("end", "instant", "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.", 0, java.lang.Integer.MAX_VALUE, end));
childrenList.add(new Property("participantType", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, participantType));
childrenList.add(new Property("actor", "Reference(Patient|Practitioner|RelatedPerson|Device|HealthcareService|Location)", "A Person, Location/HealthcareService or Device that is participating in the appointment.", 0, java.lang.Integer.MAX_VALUE, actor));
childrenList.add(new Property("participantStatus", "code", "Participation status of the Participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.", 0, java.lang.Integer.MAX_VALUE, participantStatus));
childrenList.add(new Property("comment", "string", "This comment is particularly important when the responder is declining, tentative or requesting another time to indicate the reasons why.", 0, java.lang.Integer.MAX_VALUE, comment));
childrenList.add(new Property("start", "instant", "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.", 0, java.lang.Integer.MAX_VALUE, start));
childrenList.add(new Property("end", "instant", "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.", 0, java.lang.Integer.MAX_VALUE, end));
}
public AppointmentResponse copy() {
@ -634,6 +634,8 @@ public class AppointmentResponse extends DomainResource {
dst.identifier.add(i.copy());
};
dst.appointment = appointment == null ? null : appointment.copy();
dst.start = start == null ? null : start.copy();
dst.end = end == null ? null : end.copy();
if (participantType != null) {
dst.participantType = new ArrayList<CodeableConcept>();
for (CodeableConcept i : participantType)
@ -642,8 +644,6 @@ public class AppointmentResponse extends DomainResource {
dst.actor = actor == null ? null : actor.copy();
dst.participantStatus = participantStatus == null ? null : participantStatus.copy();
dst.comment = comment == null ? null : comment.copy();
dst.start = start == null ? null : start.copy();
dst.end = end == null ? null : end.copy();
return dst;
}
@ -659,9 +659,9 @@ public class AppointmentResponse extends DomainResource {
return false;
AppointmentResponse o = (AppointmentResponse) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(appointment, o.appointment, true)
&& compareDeep(participantType, o.participantType, true) && compareDeep(actor, o.actor, true) && compareDeep(participantStatus, o.participantStatus, true)
&& compareDeep(comment, o.comment, true) && compareDeep(start, o.start, true) && compareDeep(end, o.end, true)
;
&& compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(participantType, o.participantType, true)
&& compareDeep(actor, o.actor, true) && compareDeep(participantStatus, o.participantStatus, true)
&& compareDeep(comment, o.comment, true);
}
@Override
@ -671,15 +671,15 @@ public class AppointmentResponse extends DomainResource {
if (!(other instanceof AppointmentResponse))
return false;
AppointmentResponse o = (AppointmentResponse) other;
return compareValues(participantStatus, o.participantStatus, true) && compareValues(comment, o.comment, true)
&& compareValues(start, o.start, true) && compareValues(end, o.end, true);
return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(participantStatus, o.participantStatus, true)
&& compareValues(comment, o.comment, true);
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (appointment == null || appointment.isEmpty())
&& (participantType == null || participantType.isEmpty()) && (actor == null || actor.isEmpty())
&& (participantStatus == null || participantStatus.isEmpty()) && (comment == null || comment.isEmpty())
&& (start == null || start.isEmpty()) && (end == null || end.isEmpty());
&& (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (participantType == null || participantType.isEmpty())
&& (actor == null || actor.isEmpty()) && (participantStatus == null || participantStatus.isEmpty())
&& (comment == null || comment.isEmpty());
}
@Override
@ -689,10 +689,12 @@ public class AppointmentResponse extends DomainResource {
@SearchParamDefinition(name="actor", path="AppointmentResponse.actor", description="The Person, Location/HealthcareService or Device that this appointment response replies for", type="reference" )
public static final String SP_ACTOR = "actor";
@SearchParamDefinition(name="partstatus", path="AppointmentResponse.participantStatus", description="The participants acceptance status for this appointment", type="token" )
public static final String SP_PARTSTATUS = "partstatus";
@SearchParamDefinition(name="identifier", path="AppointmentResponse.identifier", description="An Identifier in this appointment response", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="practitioner", path="AppointmentResponse.actor", description="This Response is for this Practitioner", type="reference" )
public static final String SP_PRACTITIONER = "practitioner";
@SearchParamDefinition(name="part-status", path="AppointmentResponse.participantStatus", description="The participants acceptance status for this appointment", type="token" )
public static final String SP_PARTSTATUS = "part-status";
@SearchParamDefinition(name="patient", path="AppointmentResponse.actor", description="This Response is for this Patient", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="appointment", path="AppointmentResponse.appointment", description="The appointment that the response is attached to", type="reference" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -130,9 +130,9 @@ private Map<String, Object> userData;
}
public static boolean compareDeep(List<? extends Base> e1, List<? extends Base> e2, boolean allowNull) {
if (e1 == null && e2 == null && allowNull)
if (noList(e1) && noList(e2) && allowNull)
return true;
if (e1 == null || e2 == null)
if (noList(e1) || noList(e2))
return false;
if (e1.size() != e2.size())
return false;
@ -142,6 +142,11 @@ private Map<String, Object> userData;
}
return true;
}
private static boolean noList(List<? extends Base> list) {
return list == null || list.isEmpty();
}
public static boolean compareDeep(Base e1, Base e2, boolean allowNull) {
if (e1 == null && e2 == null && allowNull)
return true;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -358,6 +358,8 @@ public class Basic extends DomainResource {
return ResourceType.Basic;
}
@SearchParamDefinition(name="identifier", path="Basic.identifier", description="Business identifier", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="code", path="Basic.code", description="Kind of Resource", type="token" )
public static final String SP_CODE = "code";
@SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the focus of this resource", type="reference" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -418,6 +418,8 @@ public class BodySite extends DomainResource {
return ResourceType.BodySite;
}
@SearchParamDefinition(name="identifier", path="BodySite.identifier", description="Identifier for this instance of the anatomical location", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="code", path="BodySite.code", description="Named anatomical location", type="token" )
public static final String SP_CODE = "code";
@SearchParamDefinition(name="patient", path="BodySite.patient", description="Patient to whom bodysite belongs", type="reference" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -1038,34 +1038,34 @@ public class Bundle extends Resource implements IBaseBundle {
protected UriType url;
/**
* If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.
* If the ETag values match, return a 304 Not modified status. See the the API documentation for ["Conditional Read"](http.html#cread).
*/
@Child(name = "ifNoneMatch", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="For managing cache currency", formalDefinition="If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation." )
@Description(shortDefinition="For managing cache currency", formalDefinition="If the ETag values match, return a 304 Not modified status. See the the API documentation for [\"Conditional Read\"](http.html#cread)." )
protected StringType ifNoneMatch;
/**
* Only perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention".
* Only perform the operation if the last updated date matches. See the the API documentation for ["Conditional Read"](http.html#cread).
*/
@Child(name = "ifMatch", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the Etag value matches. For more information, see the API section \"Managing Resource Contention\"." )
protected StringType ifMatch;
/**
* Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".
*/
@Child(name = "ifModifiedSince", type = {InstantType.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the last updated date matches. For more information, see the API section \"Managing Resource Contention\"." )
@Child(name = "ifModifiedSince", type = {InstantType.class}, order=4, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the last updated date matches. See the the API documentation for [\"Conditional Read\"](http.html#cread)." )
protected InstantType ifModifiedSince;
/**
* Instruct the server not to perform the create if a specified resource already exists. For further information, see "Conditional Create". This is just the query portion of the URL - what follows the "?" (not including the "?").
* Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).
*/
@Child(name = "ifMatch", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency)." )
protected StringType ifMatch;
/**
* Instruct the server not to perform the create if a specified resource already exists. For further information,see the the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").
*/
@Child(name = "ifNoneExist", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="For conditional creates", formalDefinition="Instruct the server not to perform the create if a specified resource already exists. For further information, see \"Conditional Create\". This is just the query portion of the URL - what follows the \"?\" (not including the \"?\")." )
@Description(shortDefinition="For conditional creates", formalDefinition="Instruct the server not to perform the create if a specified resource already exists. For further information,see the the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\")." )
protected StringType ifNoneExist;
private static final long serialVersionUID = 1355750298L;
private static final long serialVersionUID = -1349769744L;
/*
* Constructor
@ -1174,7 +1174,7 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @return {@link #ifNoneMatch} (If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value
* @return {@link #ifNoneMatch} (If the ETag values match, return a 304 Not modified status. See the the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value
*/
public StringType getIfNoneMatchElement() {
if (this.ifNoneMatch == null)
@ -1194,7 +1194,7 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @param value {@link #ifNoneMatch} (If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value
* @param value {@link #ifNoneMatch} (If the ETag values match, return a 304 Not modified status. See the the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value
*/
public BundleEntryRequestComponent setIfNoneMatchElement(StringType value) {
this.ifNoneMatch = value;
@ -1202,14 +1202,14 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @return If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.
* @return If the ETag values match, return a 304 Not modified status. See the the API documentation for ["Conditional Read"](http.html#cread).
*/
public String getIfNoneMatch() {
return this.ifNoneMatch == null ? null : this.ifNoneMatch.getValue();
}
/**
* @param value If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.
* @param value If the ETag values match, return a 304 Not modified status. See the the API documentation for ["Conditional Read"](http.html#cread).
*/
public BundleEntryRequestComponent setIfNoneMatch(String value) {
if (Utilities.noString(value))
@ -1223,56 +1223,7 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @return {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention".). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value
*/
public StringType getIfMatchElement() {
if (this.ifMatch == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifMatch");
else if (Configuration.doAutoCreate())
this.ifMatch = new StringType(); // bb
return this.ifMatch;
}
public boolean hasIfMatchElement() {
return this.ifMatch != null && !this.ifMatch.isEmpty();
}
public boolean hasIfMatch() {
return this.ifMatch != null && !this.ifMatch.isEmpty();
}
/**
* @param value {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention".). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value
*/
public BundleEntryRequestComponent setIfMatchElement(StringType value) {
this.ifMatch = value;
return this;
}
/**
* @return Only perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention".
*/
public String getIfMatch() {
return this.ifMatch == null ? null : this.ifMatch.getValue();
}
/**
* @param value Only perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention".
*/
public BundleEntryRequestComponent setIfMatch(String value) {
if (Utilities.noString(value))
this.ifMatch = null;
else {
if (this.ifMatch == null)
this.ifMatch = new StringType();
this.ifMatch.setValue(value);
}
return this;
}
/**
* @return {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value
* @return {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. See the the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value
*/
public InstantType getIfModifiedSinceElement() {
if (this.ifModifiedSince == null)
@ -1292,7 +1243,7 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @param value {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value
* @param value {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. See the the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value
*/
public BundleEntryRequestComponent setIfModifiedSinceElement(InstantType value) {
this.ifModifiedSince = value;
@ -1300,14 +1251,14 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @return Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".
* @return Only perform the operation if the last updated date matches. See the the API documentation for ["Conditional Read"](http.html#cread).
*/
public Date getIfModifiedSince() {
return this.ifModifiedSince == null ? null : this.ifModifiedSince.getValue();
}
/**
* @param value Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".
* @param value Only perform the operation if the last updated date matches. See the the API documentation for ["Conditional Read"](http.html#cread).
*/
public BundleEntryRequestComponent setIfModifiedSince(Date value) {
if (value == null)
@ -1321,7 +1272,56 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @return {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information, see "Conditional Create". This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value
* @return {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value
*/
public StringType getIfMatchElement() {
if (this.ifMatch == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifMatch");
else if (Configuration.doAutoCreate())
this.ifMatch = new StringType(); // bb
return this.ifMatch;
}
public boolean hasIfMatchElement() {
return this.ifMatch != null && !this.ifMatch.isEmpty();
}
public boolean hasIfMatch() {
return this.ifMatch != null && !this.ifMatch.isEmpty();
}
/**
* @param value {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value
*/
public BundleEntryRequestComponent setIfMatchElement(StringType value) {
this.ifMatch = value;
return this;
}
/**
* @return Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).
*/
public String getIfMatch() {
return this.ifMatch == null ? null : this.ifMatch.getValue();
}
/**
* @param value Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).
*/
public BundleEntryRequestComponent setIfMatch(String value) {
if (Utilities.noString(value))
this.ifMatch = null;
else {
if (this.ifMatch == null)
this.ifMatch = new StringType();
this.ifMatch.setValue(value);
}
return this;
}
/**
* @return {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information,see the the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value
*/
public StringType getIfNoneExistElement() {
if (this.ifNoneExist == null)
@ -1341,7 +1341,7 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @param value {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information, see "Conditional Create". This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value
* @param value {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information,see the the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value
*/
public BundleEntryRequestComponent setIfNoneExistElement(StringType value) {
this.ifNoneExist = value;
@ -1349,14 +1349,14 @@ public class Bundle extends Resource implements IBaseBundle {
}
/**
* @return Instruct the server not to perform the create if a specified resource already exists. For further information, see "Conditional Create". This is just the query portion of the URL - what follows the "?" (not including the "?").
* @return Instruct the server not to perform the create if a specified resource already exists. For further information,see the the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").
*/
public String getIfNoneExist() {
return this.ifNoneExist == null ? null : this.ifNoneExist.getValue();
}
/**
* @param value Instruct the server not to perform the create if a specified resource already exists. For further information, see "Conditional Create". This is just the query portion of the URL - what follows the "?" (not including the "?").
* @param value Instruct the server not to perform the create if a specified resource already exists. For further information,see the the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").
*/
public BundleEntryRequestComponent setIfNoneExist(String value) {
if (Utilities.noString(value))
@ -1373,10 +1373,10 @@ public class Bundle extends Resource implements IBaseBundle {
super.listChildren(childrenList);
childrenList.add(new Property("method", "code", "The HTTP verb for this entry in either a update history, or a transaction/ transaction response.", 0, java.lang.Integer.MAX_VALUE, method));
childrenList.add(new Property("url", "uri", "The URL for this entry, relative to the root (the address to which the request is posted).", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.", 0, java.lang.Integer.MAX_VALUE, ifNoneMatch));
childrenList.add(new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section \"Managing Resource Contention\".", 0, java.lang.Integer.MAX_VALUE, ifMatch));
childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. For more information, see the API section \"Managing Resource Contention\".", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince));
childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see \"Conditional Create\". This is just the query portion of the URL - what follows the \"?\" (not including the \"?\").", 0, java.lang.Integer.MAX_VALUE, ifNoneExist));
childrenList.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not modified status. See the the API documentation for [\"Conditional Read\"](http.html#cread).", 0, java.lang.Integer.MAX_VALUE, ifNoneMatch));
childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. See the the API documentation for [\"Conditional Read\"](http.html#cread).", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince));
childrenList.add(new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency).", 0, java.lang.Integer.MAX_VALUE, ifMatch));
childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information,see the the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\").", 0, java.lang.Integer.MAX_VALUE, ifNoneExist));
}
public BundleEntryRequestComponent copy() {
@ -1385,8 +1385,8 @@ public class Bundle extends Resource implements IBaseBundle {
dst.method = method == null ? null : method.copy();
dst.url = url == null ? null : url.copy();
dst.ifNoneMatch = ifNoneMatch == null ? null : ifNoneMatch.copy();
dst.ifMatch = ifMatch == null ? null : ifMatch.copy();
dst.ifModifiedSince = ifModifiedSince == null ? null : ifModifiedSince.copy();
dst.ifMatch = ifMatch == null ? null : ifMatch.copy();
dst.ifNoneExist = ifNoneExist == null ? null : ifNoneExist.copy();
return dst;
}
@ -1399,7 +1399,7 @@ public class Bundle extends Resource implements IBaseBundle {
return false;
BundleEntryRequestComponent o = (BundleEntryRequestComponent) other;
return compareDeep(method, o.method, true) && compareDeep(url, o.url, true) && compareDeep(ifNoneMatch, o.ifNoneMatch, true)
&& compareDeep(ifMatch, o.ifMatch, true) && compareDeep(ifModifiedSince, o.ifModifiedSince, true)
&& compareDeep(ifModifiedSince, o.ifModifiedSince, true) && compareDeep(ifMatch, o.ifMatch, true)
&& compareDeep(ifNoneExist, o.ifNoneExist, true);
}
@ -1411,14 +1411,14 @@ public class Bundle extends Resource implements IBaseBundle {
return false;
BundleEntryRequestComponent o = (BundleEntryRequestComponent) other;
return compareValues(method, o.method, true) && compareValues(url, o.url, true) && compareValues(ifNoneMatch, o.ifNoneMatch, true)
&& compareValues(ifMatch, o.ifMatch, true) && compareValues(ifModifiedSince, o.ifModifiedSince, true)
&& compareValues(ifModifiedSince, o.ifModifiedSince, true) && compareValues(ifMatch, o.ifMatch, true)
&& compareValues(ifNoneExist, o.ifNoneExist, true);
}
public boolean isEmpty() {
return super.isEmpty() && (method == null || method.isEmpty()) && (url == null || url.isEmpty())
&& (ifNoneMatch == null || ifNoneMatch.isEmpty()) && (ifMatch == null || ifMatch.isEmpty())
&& (ifModifiedSince == null || ifModifiedSince.isEmpty()) && (ifNoneExist == null || ifNoneExist.isEmpty())
&& (ifNoneMatch == null || ifNoneMatch.isEmpty()) && (ifModifiedSince == null || ifModifiedSince.isEmpty())
&& (ifMatch == null || ifMatch.isEmpty()) && (ifNoneExist == null || ifNoneExist.isEmpty())
;
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -163,10 +163,10 @@ public class Communication extends DomainResource {
@Block()
public static class CommunicationPayloadComponent extends BackboneElement implements IBaseBackboneElement {
/**
* An individual message part for multi-part messages.
* A communicated content (or for multi-part communications, one portion of the communication).
*/
@Child(name = "content", type = {StringType.class, Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Message part content", formalDefinition="An individual message part for multi-part messages." )
@Description(shortDefinition="Message part content", formalDefinition="A communicated content (or for multi-part communications, one portion of the communication)." )
protected Type content;
private static final long serialVersionUID = -1763459053L;
@ -187,14 +187,14 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).)
*/
public Type getContent() {
return this.content;
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).)
*/
public StringType getContentStringType() throws Exception {
if (!(this.content instanceof StringType))
@ -207,7 +207,7 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).)
*/
public Attachment getContentAttachment() throws Exception {
if (!(this.content instanceof Attachment))
@ -220,7 +220,7 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).)
*/
public Reference getContentReference() throws Exception {
if (!(this.content instanceof Reference))
@ -237,7 +237,7 @@ public class Communication extends DomainResource {
}
/**
* @param value {@link #content} (An individual message part for multi-part messages.)
* @param value {@link #content} (A communicated content (or for multi-part communications, one portion of the communication).)
*/
public CommunicationPayloadComponent setContent(Type value) {
this.content = value;
@ -246,7 +246,7 @@ public class Communication extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "An individual message part for multi-part messages.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "A communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content));
}
public CommunicationPayloadComponent copy() {
@ -309,13 +309,13 @@ public class Communication extends DomainResource {
protected Resource senderTarget;
/**
* The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication.
* The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).
*/
@Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication." )
@Child(name = "recipient", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Group.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time)." )
protected List<Reference> recipient;
/**
* The actual objects that are the target of the reference (The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication.)
* The actual objects that are the target of the reference (The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).)
*/
protected List<Resource> recipientTarget;
@ -328,10 +328,10 @@ public class Communication extends DomainResource {
protected List<CommunicationPayloadComponent> payload;
/**
* The communication medium, e.g., email, fax.
* A channel that was used for this communication (e.g. email, fax).
*/
@Child(name = "medium", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Communication medium", formalDefinition="The communication medium, e.g., email, fax." )
@Description(shortDefinition="A channel of communication", formalDefinition="A channel that was used for this communication (e.g. email, fax)." )
protected List<CodeableConcept> medium;
/**
@ -386,7 +386,19 @@ public class Communication extends DomainResource {
*/
protected Patient subjectTarget;
private static final long serialVersionUID = -744574729L;
/**
* The communication request that was responsible for producing this communication.
*/
@Child(name = "requestDetail", type = {CommunicationRequest.class}, order=12, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="CommunicationRequest producing this message", formalDefinition="The communication request that was responsible for producing this communication." )
protected Reference requestDetail;
/**
* The actual object that is the target of the reference (The communication request that was responsible for producing this communication.)
*/
protected CommunicationRequest requestDetailTarget;
private static final long serialVersionUID = -1654449146L;
/*
* Constructor
@ -499,7 +511,7 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #recipient} (The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication.)
* @return {@link #recipient} (The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).)
*/
public List<Reference> getRecipient() {
if (this.recipient == null)
@ -517,7 +529,7 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #recipient} (The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication.)
* @return {@link #recipient} (The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).)
*/
// syntactic sugar
public Reference addRecipient() { //3
@ -539,7 +551,7 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication.)
* @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).)
*/
public List<Resource> getRecipientTarget() {
if (this.recipientTarget == null)
@ -588,7 +600,7 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #medium} (The communication medium, e.g., email, fax.)
* @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).)
*/
public List<CodeableConcept> getMedium() {
if (this.medium == null)
@ -606,7 +618,7 @@ public class Communication extends DomainResource {
}
/**
* @return {@link #medium} (The communication medium, e.g., email, fax.)
* @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).)
*/
// syntactic sugar
public CodeableConcept addMedium() { //3
@ -902,20 +914,65 @@ public class Communication extends DomainResource {
return this;
}
/**
* @return {@link #requestDetail} (The communication request that was responsible for producing this communication.)
*/
public Reference getRequestDetail() {
if (this.requestDetail == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Communication.requestDetail");
else if (Configuration.doAutoCreate())
this.requestDetail = new Reference(); // cc
return this.requestDetail;
}
public boolean hasRequestDetail() {
return this.requestDetail != null && !this.requestDetail.isEmpty();
}
/**
* @param value {@link #requestDetail} (The communication request that was responsible for producing this communication.)
*/
public Communication setRequestDetail(Reference value) {
this.requestDetail = value;
return this;
}
/**
* @return {@link #requestDetail} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The communication request that was responsible for producing this communication.)
*/
public CommunicationRequest getRequestDetailTarget() {
if (this.requestDetailTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Communication.requestDetail");
else if (Configuration.doAutoCreate())
this.requestDetailTarget = new CommunicationRequest(); // aa
return this.requestDetailTarget;
}
/**
* @param value {@link #requestDetail} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The communication request that was responsible for producing this communication.)
*/
public Communication setRequestDetailTarget(CommunicationRequest value) {
this.requestDetailTarget = value;
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("category", "CodeableConcept", "The type of message conveyed such as alert, notification, reminder, instruction, etc.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g., person, organization, clinical information system, or device) which was the source of the communication.", 0, java.lang.Integer.MAX_VALUE, sender));
childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient));
childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson|Group)", "The entity (e.g., person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).", 0, java.lang.Integer.MAX_VALUE, recipient));
childrenList.add(new Property("payload", "", "Text, attachment(s), or resource(s) that was communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload));
childrenList.add(new Property("medium", "CodeableConcept", "The communication medium, e.g., email, fax.", 0, java.lang.Integer.MAX_VALUE, medium));
childrenList.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium));
childrenList.add(new Property("status", "code", "The status of the transmission.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter within which the communication was sent.", 0, java.lang.Integer.MAX_VALUE, encounter));
childrenList.add(new Property("sent", "dateTime", "The time when this communication was sent.", 0, java.lang.Integer.MAX_VALUE, sent));
childrenList.add(new Property("received", "dateTime", "The time when this communication arrived at the destination.", 0, java.lang.Integer.MAX_VALUE, received));
childrenList.add(new Property("reason", "CodeableConcept", "The reason or justification for the communication.", 0, java.lang.Integer.MAX_VALUE, reason));
childrenList.add(new Property("subject", "Reference(Patient)", "The patient who was the focus of this communication.", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("requestDetail", "Reference(CommunicationRequest)", "The communication request that was responsible for producing this communication.", 0, java.lang.Integer.MAX_VALUE, requestDetail));
}
public Communication copy() {
@ -953,6 +1010,7 @@ public class Communication extends DomainResource {
dst.reason.add(i.copy());
};
dst.subject = subject == null ? null : subject.copy();
dst.requestDetail = requestDetail == null ? null : requestDetail.copy();
return dst;
}
@ -971,7 +1029,7 @@ public class Communication extends DomainResource {
&& compareDeep(recipient, o.recipient, true) && compareDeep(payload, o.payload, true) && compareDeep(medium, o.medium, true)
&& compareDeep(status, o.status, true) && compareDeep(encounter, o.encounter, true) && compareDeep(sent, o.sent, true)
&& compareDeep(received, o.received, true) && compareDeep(reason, o.reason, true) && compareDeep(subject, o.subject, true)
;
&& compareDeep(requestDetail, o.requestDetail, true);
}
@Override
@ -990,7 +1048,8 @@ public class Communication extends DomainResource {
&& (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty())
&& (medium == null || medium.isEmpty()) && (status == null || status.isEmpty()) && (encounter == null || encounter.isEmpty())
&& (sent == null || sent.isEmpty()) && (received == null || received.isEmpty()) && (reason == null || reason.isEmpty())
&& (subject == null || subject.isEmpty());
&& (subject == null || subject.isEmpty()) && (requestDetail == null || requestDetail.isEmpty())
;
}
@Override
@ -1000,6 +1059,8 @@ public class Communication extends DomainResource {
@SearchParamDefinition(name="identifier", path="Communication.identifier", description="Unique identifier", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="request", path="Communication.requestDetail", description="CommunicationRequest producing this message", type="reference" )
public static final String SP_REQUEST = "request";
@SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference" )
public static final String SP_SENDER = "sender";
@SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference" )
@ -1010,7 +1071,7 @@ public class Communication extends DomainResource {
public static final String SP_RECIPIENT = "recipient";
@SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date" )
public static final String SP_RECEIVED = "received";
@SearchParamDefinition(name="medium", path="Communication.medium", description="Communication medium", type="token" )
@SearchParamDefinition(name="medium", path="Communication.medium", description="A channel of communication", type="token" )
public static final String SP_MEDIUM = "medium";
@SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference" )
public static final String SP_ENCOUNTER = "encounter";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -233,10 +233,10 @@ public class CommunicationRequest extends DomainResource {
@Block()
public static class CommunicationRequestPayloadComponent extends BackboneElement implements IBaseBackboneElement {
/**
* An individual message part for multi-part messages.
* The communicated content (or for multi-part communications, one portion of the communication).
*/
@Child(name = "content", type = {StringType.class, Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Message part content", formalDefinition="An individual message part for multi-part messages." )
@Description(shortDefinition="Message part content", formalDefinition="The communicated content (or for multi-part communications, one portion of the communication)." )
protected Type content;
private static final long serialVersionUID = -1763459053L;
@ -257,14 +257,14 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
*/
public Type getContent() {
return this.content;
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
*/
public StringType getContentStringType() throws Exception {
if (!(this.content instanceof StringType))
@ -277,7 +277,7 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
*/
public Attachment getContentAttachment() throws Exception {
if (!(this.content instanceof Attachment))
@ -290,7 +290,7 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @return {@link #content} (An individual message part for multi-part messages.)
* @return {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
*/
public Reference getContentReference() throws Exception {
if (!(this.content instanceof Reference))
@ -307,7 +307,7 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @param value {@link #content} (An individual message part for multi-part messages.)
* @param value {@link #content} (The communicated content (or for multi-part communications, one portion of the communication).)
*/
public CommunicationRequestPayloadComponent setContent(Type value) {
this.content = value;
@ -316,7 +316,7 @@ public class CommunicationRequest extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "An individual message part for multi-part messages.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("content[x]", "string|Attachment|Reference(Any)", "The communicated content (or for multi-part communications, one portion of the communication).", 0, java.lang.Integer.MAX_VALUE, content));
}
public CommunicationRequestPayloadComponent copy() {
@ -398,17 +398,17 @@ public class CommunicationRequest extends DomainResource {
protected List<CommunicationRequestPayloadComponent> payload;
/**
* The communication medium to be used, e.g., email, fax.
* A channel that was used for this communication (e.g. email, fax).
*/
@Child(name = "medium", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Communication medium", formalDefinition="The communication medium to be used, e.g., email, fax." )
@Description(shortDefinition="A channel of communication", formalDefinition="A channel that was used for this communication (e.g. email, fax)." )
protected List<CodeableConcept> medium;
/**
* The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application.
*/
@Child(name = "requester", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Requester of communication", formalDefinition="The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application." )
@Description(shortDefinition="An individual who requested a communication", formalDefinition="The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application." )
protected Reference requester;
/**
@ -438,9 +438,9 @@ public class CommunicationRequest extends DomainResource {
/**
* The time when this communication is to occur.
*/
@Child(name = "scheduledTime", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true)
@Child(name = "scheduled", type = {DateTimeType.class, Period.class}, order=9, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When scheduled", formalDefinition="The time when this communication is to occur." )
protected DateTimeType scheduledTime;
protected Type scheduled;
/**
* The reason or justification for the communication request.
@ -452,9 +452,9 @@ public class CommunicationRequest extends DomainResource {
/**
* The time when the request was made.
*/
@Child(name = "orderedOn", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true)
@Child(name = "requestedOn", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When ordered or proposed", formalDefinition="The time when the request was made." )
protected DateTimeType orderedOn;
protected DateTimeType requestedOn;
/**
* The patient who is the focus of this communication request.
@ -475,7 +475,7 @@ public class CommunicationRequest extends DomainResource {
@Description(shortDefinition="Message urgency", formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." )
protected CodeableConcept priority;
private static final long serialVersionUID = 431529355L;
private static final long serialVersionUID = 146906020L;
/*
* Constructor
@ -677,7 +677,7 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @return {@link #medium} (The communication medium to be used, e.g., email, fax.)
* @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).)
*/
public List<CodeableConcept> getMedium() {
if (this.medium == null)
@ -695,7 +695,7 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @return {@link #medium} (The communication medium to be used, e.g., email, fax.)
* @return {@link #medium} (A channel that was used for this communication (e.g. email, fax).)
*/
// syntactic sugar
public CodeableConcept addMedium() { //3
@ -849,51 +849,47 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @return {@link #scheduledTime} (The time when this communication is to occur.). This is the underlying object with id, value and extensions. The accessor "getScheduledTime" gives direct access to the value
* @return {@link #scheduled} (The time when this communication is to occur.)
*/
public DateTimeType getScheduledTimeElement() {
if (this.scheduledTime == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CommunicationRequest.scheduledTime");
else if (Configuration.doAutoCreate())
this.scheduledTime = new DateTimeType(); // bb
return this.scheduledTime;
}
public boolean hasScheduledTimeElement() {
return this.scheduledTime != null && !this.scheduledTime.isEmpty();
}
public boolean hasScheduledTime() {
return this.scheduledTime != null && !this.scheduledTime.isEmpty();
public Type getScheduled() {
return this.scheduled;
}
/**
* @param value {@link #scheduledTime} (The time when this communication is to occur.). This is the underlying object with id, value and extensions. The accessor "getScheduledTime" gives direct access to the value
* @return {@link #scheduled} (The time when this communication is to occur.)
*/
public CommunicationRequest setScheduledTimeElement(DateTimeType value) {
this.scheduledTime = value;
return this;
public DateTimeType getScheduledDateTimeType() throws Exception {
if (!(this.scheduled instanceof DateTimeType))
throw new Exception("Type mismatch: the type DateTimeType was expected, but "+this.scheduled.getClass().getName()+" was encountered");
return (DateTimeType) this.scheduled;
}
public boolean hasScheduledDateTimeType() throws Exception {
return this.scheduled instanceof DateTimeType;
}
/**
* @return The time when this communication is to occur.
* @return {@link #scheduled} (The time when this communication is to occur.)
*/
public Date getScheduledTime() {
return this.scheduledTime == null ? null : this.scheduledTime.getValue();
public Period getScheduledPeriod() throws Exception {
if (!(this.scheduled instanceof Period))
throw new Exception("Type mismatch: the type Period was expected, but "+this.scheduled.getClass().getName()+" was encountered");
return (Period) this.scheduled;
}
public boolean hasScheduledPeriod() throws Exception {
return this.scheduled instanceof Period;
}
public boolean hasScheduled() {
return this.scheduled != null && !this.scheduled.isEmpty();
}
/**
* @param value The time when this communication is to occur.
* @param value {@link #scheduled} (The time when this communication is to occur.)
*/
public CommunicationRequest setScheduledTime(Date value) {
if (value == null)
this.scheduledTime = null;
else {
if (this.scheduledTime == null)
this.scheduledTime = new DateTimeType();
this.scheduledTime.setValue(value);
}
public CommunicationRequest setScheduled(Type value) {
this.scheduled = value;
return this;
}
@ -938,50 +934,50 @@ public class CommunicationRequest extends DomainResource {
}
/**
* @return {@link #orderedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getOrderedOn" gives direct access to the value
* @return {@link #requestedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getRequestedOn" gives direct access to the value
*/
public DateTimeType getOrderedOnElement() {
if (this.orderedOn == null)
public DateTimeType getRequestedOnElement() {
if (this.requestedOn == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CommunicationRequest.orderedOn");
throw new Error("Attempt to auto-create CommunicationRequest.requestedOn");
else if (Configuration.doAutoCreate())
this.orderedOn = new DateTimeType(); // bb
return this.orderedOn;
this.requestedOn = new DateTimeType(); // bb
return this.requestedOn;
}
public boolean hasOrderedOnElement() {
return this.orderedOn != null && !this.orderedOn.isEmpty();
public boolean hasRequestedOnElement() {
return this.requestedOn != null && !this.requestedOn.isEmpty();
}
public boolean hasOrderedOn() {
return this.orderedOn != null && !this.orderedOn.isEmpty();
public boolean hasRequestedOn() {
return this.requestedOn != null && !this.requestedOn.isEmpty();
}
/**
* @param value {@link #orderedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getOrderedOn" gives direct access to the value
* @param value {@link #requestedOn} (The time when the request was made.). This is the underlying object with id, value and extensions. The accessor "getRequestedOn" gives direct access to the value
*/
public CommunicationRequest setOrderedOnElement(DateTimeType value) {
this.orderedOn = value;
public CommunicationRequest setRequestedOnElement(DateTimeType value) {
this.requestedOn = value;
return this;
}
/**
* @return The time when the request was made.
*/
public Date getOrderedOn() {
return this.orderedOn == null ? null : this.orderedOn.getValue();
public Date getRequestedOn() {
return this.requestedOn == null ? null : this.requestedOn.getValue();
}
/**
* @param value The time when the request was made.
*/
public CommunicationRequest setOrderedOn(Date value) {
public CommunicationRequest setRequestedOn(Date value) {
if (value == null)
this.orderedOn = null;
this.requestedOn = null;
else {
if (this.orderedOn == null)
this.orderedOn = new DateTimeType();
this.orderedOn.setValue(value);
if (this.requestedOn == null)
this.requestedOn = new DateTimeType();
this.requestedOn.setValue(value);
}
return this;
}
@ -1061,13 +1057,13 @@ public class CommunicationRequest extends DomainResource {
childrenList.add(new Property("sender", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g., person, organization, clinical information system, or device) which is to be the source of the communication.", 0, java.lang.Integer.MAX_VALUE, sender));
childrenList.add(new Property("recipient", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication.", 0, java.lang.Integer.MAX_VALUE, recipient));
childrenList.add(new Property("payload", "", "Text, attachment(s), or resource(s) to be communicated to the recipient.", 0, java.lang.Integer.MAX_VALUE, payload));
childrenList.add(new Property("medium", "CodeableConcept", "The communication medium to be used, e.g., email, fax.", 0, java.lang.Integer.MAX_VALUE, medium));
childrenList.add(new Property("medium", "CodeableConcept", "A channel that was used for this communication (e.g. email, fax).", 0, java.lang.Integer.MAX_VALUE, medium));
childrenList.add(new Property("requester", "Reference(Practitioner|Patient|RelatedPerson)", "The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application.", 0, java.lang.Integer.MAX_VALUE, requester));
childrenList.add(new Property("status", "code", "The status of the proposal or order.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter within which the communication request was created.", 0, java.lang.Integer.MAX_VALUE, encounter));
childrenList.add(new Property("scheduledTime", "dateTime", "The time when this communication is to occur.", 0, java.lang.Integer.MAX_VALUE, scheduledTime));
childrenList.add(new Property("scheduled[x]", "dateTime|Period", "The time when this communication is to occur.", 0, java.lang.Integer.MAX_VALUE, scheduled));
childrenList.add(new Property("reason", "CodeableConcept", "The reason or justification for the communication request.", 0, java.lang.Integer.MAX_VALUE, reason));
childrenList.add(new Property("orderedOn", "dateTime", "The time when the request was made.", 0, java.lang.Integer.MAX_VALUE, orderedOn));
childrenList.add(new Property("requestedOn", "dateTime", "The time when the request was made.", 0, java.lang.Integer.MAX_VALUE, requestedOn));
childrenList.add(new Property("subject", "Reference(Patient)", "The patient who is the focus of this communication request.", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("priority", "CodeableConcept", "Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.", 0, java.lang.Integer.MAX_VALUE, priority));
}
@ -1100,13 +1096,13 @@ public class CommunicationRequest extends DomainResource {
dst.requester = requester == null ? null : requester.copy();
dst.status = status == null ? null : status.copy();
dst.encounter = encounter == null ? null : encounter.copy();
dst.scheduledTime = scheduledTime == null ? null : scheduledTime.copy();
dst.scheduled = scheduled == null ? null : scheduled.copy();
if (reason != null) {
dst.reason = new ArrayList<CodeableConcept>();
for (CodeableConcept i : reason)
dst.reason.add(i.copy());
};
dst.orderedOn = orderedOn == null ? null : orderedOn.copy();
dst.requestedOn = requestedOn == null ? null : requestedOn.copy();
dst.subject = subject == null ? null : subject.copy();
dst.priority = priority == null ? null : priority.copy();
return dst;
@ -1126,7 +1122,7 @@ public class CommunicationRequest extends DomainResource {
return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(sender, o.sender, true)
&& compareDeep(recipient, o.recipient, true) && compareDeep(payload, o.payload, true) && compareDeep(medium, o.medium, true)
&& compareDeep(requester, o.requester, true) && compareDeep(status, o.status, true) && compareDeep(encounter, o.encounter, true)
&& compareDeep(scheduledTime, o.scheduledTime, true) && compareDeep(reason, o.reason, true) && compareDeep(orderedOn, o.orderedOn, true)
&& compareDeep(scheduled, o.scheduled, true) && compareDeep(reason, o.reason, true) && compareDeep(requestedOn, o.requestedOn, true)
&& compareDeep(subject, o.subject, true) && compareDeep(priority, o.priority, true);
}
@ -1137,17 +1133,16 @@ public class CommunicationRequest extends DomainResource {
if (!(other instanceof CommunicationRequest))
return false;
CommunicationRequest o = (CommunicationRequest) other;
return compareValues(status, o.status, true) && compareValues(scheduledTime, o.scheduledTime, true)
&& compareValues(orderedOn, o.orderedOn, true);
return compareValues(status, o.status, true) && compareValues(requestedOn, o.requestedOn, true);
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty())
&& (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty())
&& (medium == null || medium.isEmpty()) && (requester == null || requester.isEmpty()) && (status == null || status.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (scheduledTime == null || scheduledTime.isEmpty())
&& (reason == null || reason.isEmpty()) && (orderedOn == null || orderedOn.isEmpty()) && (subject == null || subject.isEmpty())
&& (priority == null || priority.isEmpty());
&& (encounter == null || encounter.isEmpty()) && (scheduled == null || scheduled.isEmpty())
&& (reason == null || reason.isEmpty()) && (requestedOn == null || requestedOn.isEmpty())
&& (subject == null || subject.isEmpty()) && (priority == null || priority.isEmpty());
}
@Override
@ -1155,27 +1150,27 @@ public class CommunicationRequest extends DomainResource {
return ResourceType.CommunicationRequest;
}
@SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="Requester of communication", type="reference" )
@SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="An individual who requested a communication", type="reference" )
public static final String SP_REQUESTER = "requester";
@SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="ordered", path="CommunicationRequest.orderedOn", description="When ordered or proposed", type="date" )
public static final String SP_ORDERED = "ordered";
@SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" )
public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="Communication medium", type="token" )
@SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="A channel of communication", type="token" )
public static final String SP_MEDIUM = "medium";
@SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" )
public static final String SP_ENCOUNTER = "encounter";
@SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" )
public static final String SP_PRIORITY = "priority";
@SearchParamDefinition(name="requested", path="CommunicationRequest.requestedOn", description="When ordered or proposed", type="date" )
public static final String SP_REQUESTED = "requested";
@SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" )
public static final String SP_SENDER = "sender";
@SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference" )
public static final String SP_RECIPIENT = "recipient";
@SearchParamDefinition(name="time", path="CommunicationRequest.scheduledTime", description="When scheduled", type="date" )
@SearchParamDefinition(name="time", path="CommunicationRequest.scheduledDateTime", description="When scheduled", type="date" )
public static final String SP_TIME = "time";
@SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" )
public static final String SP_CATEGORY = "category";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -1435,6 +1435,8 @@ public class Condition extends DomainResource {
@SearchParamDefinition(name="severity", path="Condition.severity", description="The severity of the condition", type="token" )
public static final String SP_SEVERITY = "severity";
@SearchParamDefinition(name="identifier", path="Condition.identifier", description="A unique identifier of the condition record", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="clinicalstatus", path="Condition.clinicalStatus", description="The clinical status of the condition", type="token" )
public static final String SP_CLINICALSTATUS = "clinicalstatus";
@SearchParamDefinition(name="onset-info", path="Condition.onset[x]", description="Other onsets (boolean, age, range, string)", type="string" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -5707,7 +5707,7 @@ public class Conformance extends DomainResource implements IBaseConformance {
* The version of the FHIR specification on which this conformance statement is based.
*/
@Child(name = "fhirVersion", type = {IdType.class}, order=14, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="FHIR Version", formalDefinition="The version of the FHIR specification on which this conformance statement is based." )
@Description(shortDefinition="FHIR Version the system uses", formalDefinition="The version of the FHIR specification on which this conformance statement is based." )
protected IdType fhirVersion;
/**

View File

@ -29,12 +29,12 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
public class Constants {
public final static String VERSION = "0.5.0";
public final static String REVISION = "6636";
public final static String DATE = "Thu Aug 27 19:45:13 EDT 2015";
public final static String VERSION = "1.0.0";
public final static String REVISION = "6867";
public final static String DATE = "Tue Sep 01 19:08:30 EDT 2015";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -43,27 +43,27 @@ import org.hl7.fhir.instance.model.api.*;
/**
* Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient. E.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
*/
@ResourceDef(name="Contraindication", profile="http://hl7.org/fhir/Profile/Contraindication")
public class Contraindication extends DomainResource {
@ResourceDef(name="DetectedIssue", profile="http://hl7.org/fhir/Profile/DetectedIssue")
public class DetectedIssue extends DomainResource {
public enum ContraindicationSeverity {
public enum DetectedIssueSeverity {
/**
* Indicates the condition may be life-threatening or has the potential to cause permanent injury
* Indicates the issue may be life-threatening or has the potential to cause permanent injury
*/
HIGH,
/**
* Indicates the condition may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury
* Indicates the issue may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury
*/
MODERATE,
/**
* Indicates the condition may result in some adverse consequences but is unlikely to substantially affect the situation of the subjec
* Indicates the issue may result in some adverse consequences but is unlikely to substantially affect the situation of the subjec
*/
LOW,
/**
* added to help the parsers
*/
NULL;
public static ContraindicationSeverity fromCode(String codeString) throws Exception {
public static DetectedIssueSeverity fromCode(String codeString) throws Exception {
if (codeString == null || "".equals(codeString))
return null;
if ("high".equals(codeString))
@ -72,7 +72,7 @@ public class Contraindication extends DomainResource {
return MODERATE;
if ("low".equals(codeString))
return LOW;
throw new Exception("Unknown ContraindicationSeverity code '"+codeString+"'");
throw new Exception("Unknown DetectedIssueSeverity code '"+codeString+"'");
}
public String toCode() {
switch (this) {
@ -84,17 +84,17 @@ public class Contraindication extends DomainResource {
}
public String getSystem() {
switch (this) {
case HIGH: return "http://hl7.org/fhir/contraindication-severity";
case MODERATE: return "http://hl7.org/fhir/contraindication-severity";
case LOW: return "http://hl7.org/fhir/contraindication-severity";
case HIGH: return "http://hl7.org/fhir/detectedissue-severity";
case MODERATE: return "http://hl7.org/fhir/detectedissue-severity";
case LOW: return "http://hl7.org/fhir/detectedissue-severity";
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case HIGH: return "Indicates the condition may be life-threatening or has the potential to cause permanent injury";
case MODERATE: return "Indicates the condition may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury";
case LOW: return "Indicates the condition may result in some adverse consequences but is unlikely to substantially affect the situation of the subjec";
case HIGH: return "Indicates the issue may be life-threatening or has the potential to cause permanent injury";
case MODERATE: return "Indicates the issue may result in noticable adverse adverse consequences but is unlikely to be life-threatening or cause permanent injury";
case LOW: return "Indicates the issue may result in some adverse consequences but is unlikely to substantially affect the situation of the subjec";
default: return "?";
}
}
@ -108,37 +108,37 @@ public class Contraindication extends DomainResource {
}
}
public static class ContraindicationSeverityEnumFactory implements EnumFactory<ContraindicationSeverity> {
public ContraindicationSeverity fromCode(String codeString) throws IllegalArgumentException {
public static class DetectedIssueSeverityEnumFactory implements EnumFactory<DetectedIssueSeverity> {
public DetectedIssueSeverity fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("high".equals(codeString))
return ContraindicationSeverity.HIGH;
return DetectedIssueSeverity.HIGH;
if ("moderate".equals(codeString))
return ContraindicationSeverity.MODERATE;
return DetectedIssueSeverity.MODERATE;
if ("low".equals(codeString))
return ContraindicationSeverity.LOW;
throw new IllegalArgumentException("Unknown ContraindicationSeverity code '"+codeString+"'");
return DetectedIssueSeverity.LOW;
throw new IllegalArgumentException("Unknown DetectedIssueSeverity code '"+codeString+"'");
}
public String toCode(ContraindicationSeverity code) {
if (code == ContraindicationSeverity.HIGH)
public String toCode(DetectedIssueSeverity code) {
if (code == DetectedIssueSeverity.HIGH)
return "high";
if (code == ContraindicationSeverity.MODERATE)
if (code == DetectedIssueSeverity.MODERATE)
return "moderate";
if (code == ContraindicationSeverity.LOW)
if (code == DetectedIssueSeverity.LOW)
return "low";
return "?";
}
}
@Block()
public static class ContraindicationMitigationComponent extends BackboneElement implements IBaseBackboneElement {
public static class DetectedIssueMitigationComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified contraindication.
* Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.
*/
@Child(name = "action", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="What mitigation?", formalDefinition="Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified contraindication." )
@Description(shortDefinition="What mitigation?", formalDefinition="Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue." )
protected CodeableConcept action;
/**
@ -165,25 +165,25 @@ public class Contraindication extends DomainResource {
/*
* Constructor
*/
public ContraindicationMitigationComponent() {
public DetectedIssueMitigationComponent() {
super();
}
/*
* Constructor
*/
public ContraindicationMitigationComponent(CodeableConcept action) {
public DetectedIssueMitigationComponent(CodeableConcept action) {
super();
this.action = action;
}
/**
* @return {@link #action} (Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified contraindication.)
* @return {@link #action} (Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.)
*/
public CodeableConcept getAction() {
if (this.action == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ContraindicationMitigationComponent.action");
throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.action");
else if (Configuration.doAutoCreate())
this.action = new CodeableConcept(); // cc
return this.action;
@ -194,9 +194,9 @@ public class Contraindication extends DomainResource {
}
/**
* @param value {@link #action} (Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified contraindication.)
* @param value {@link #action} (Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.)
*/
public ContraindicationMitigationComponent setAction(CodeableConcept value) {
public DetectedIssueMitigationComponent setAction(CodeableConcept value) {
this.action = value;
return this;
}
@ -207,7 +207,7 @@ public class Contraindication extends DomainResource {
public DateTimeType getDateElement() {
if (this.date == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ContraindicationMitigationComponent.date");
throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.date");
else if (Configuration.doAutoCreate())
this.date = new DateTimeType(); // bb
return this.date;
@ -224,7 +224,7 @@ public class Contraindication extends DomainResource {
/**
* @param value {@link #date} (Indicates when the mitigating action was documented.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public ContraindicationMitigationComponent setDateElement(DateTimeType value) {
public DetectedIssueMitigationComponent setDateElement(DateTimeType value) {
this.date = value;
return this;
}
@ -239,7 +239,7 @@ public class Contraindication extends DomainResource {
/**
* @param value Indicates when the mitigating action was documented.
*/
public ContraindicationMitigationComponent setDate(Date value) {
public DetectedIssueMitigationComponent setDate(Date value) {
if (value == null)
this.date = null;
else {
@ -256,7 +256,7 @@ public class Contraindication extends DomainResource {
public Reference getAuthor() {
if (this.author == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ContraindicationMitigationComponent.author");
throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.author");
else if (Configuration.doAutoCreate())
this.author = new Reference(); // cc
return this.author;
@ -269,7 +269,7 @@ public class Contraindication extends DomainResource {
/**
* @param value {@link #author} (Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.)
*/
public ContraindicationMitigationComponent setAuthor(Reference value) {
public DetectedIssueMitigationComponent setAuthor(Reference value) {
this.author = value;
return this;
}
@ -280,7 +280,7 @@ public class Contraindication extends DomainResource {
public Practitioner getAuthorTarget() {
if (this.authorTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ContraindicationMitigationComponent.author");
throw new Error("Attempt to auto-create DetectedIssueMitigationComponent.author");
else if (Configuration.doAutoCreate())
this.authorTarget = new Practitioner(); // aa
return this.authorTarget;
@ -289,20 +289,20 @@ public class Contraindication extends DomainResource {
/**
* @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.)
*/
public ContraindicationMitigationComponent setAuthorTarget(Practitioner value) {
public DetectedIssueMitigationComponent setAuthorTarget(Practitioner value) {
this.authorTarget = value;
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("action", "CodeableConcept", "Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified contraindication.", 0, java.lang.Integer.MAX_VALUE, action));
childrenList.add(new Property("action", "CodeableConcept", "Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.", 0, java.lang.Integer.MAX_VALUE, action));
childrenList.add(new Property("date", "dateTime", "Indicates when the mitigating action was documented.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("author", "Reference(Practitioner)", "Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.", 0, java.lang.Integer.MAX_VALUE, author));
}
public ContraindicationMitigationComponent copy() {
ContraindicationMitigationComponent dst = new ContraindicationMitigationComponent();
public DetectedIssueMitigationComponent copy() {
DetectedIssueMitigationComponent dst = new DetectedIssueMitigationComponent();
copyValues(dst);
dst.action = action == null ? null : action.copy();
dst.date = date == null ? null : date.copy();
@ -314,9 +314,9 @@ public class Contraindication extends DomainResource {
public boolean equalsDeep(Base other) {
if (!super.equalsDeep(other))
return false;
if (!(other instanceof ContraindicationMitigationComponent))
if (!(other instanceof DetectedIssueMitigationComponent))
return false;
ContraindicationMitigationComponent o = (ContraindicationMitigationComponent) other;
DetectedIssueMitigationComponent o = (DetectedIssueMitigationComponent) other;
return compareDeep(action, o.action, true) && compareDeep(date, o.date, true) && compareDeep(author, o.author, true)
;
}
@ -325,9 +325,9 @@ public class Contraindication extends DomainResource {
public boolean equalsShallow(Base other) {
if (!super.equalsShallow(other))
return false;
if (!(other instanceof ContraindicationMitigationComponent))
if (!(other instanceof DetectedIssueMitigationComponent))
return false;
ContraindicationMitigationComponent o = (ContraindicationMitigationComponent) other;
DetectedIssueMitigationComponent o = (DetectedIssueMitigationComponent) other;
return compareValues(date, o.date, true);
}
@ -339,14 +339,14 @@ public class Contraindication extends DomainResource {
}
/**
* Indicates the patient whose record the contraindication is associated with.
* Indicates the patient whose record the detected issue is associated with.
*/
@Child(name = "patient", type = {Patient.class}, order=0, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Associated patient", formalDefinition="Indicates the patient whose record the contraindication is associated with." )
@Description(shortDefinition="Associated patient", formalDefinition="Indicates the patient whose record the detected issue is associated with." )
protected Reference patient;
/**
* The actual object that is the target of the reference (Indicates the patient whose record the contraindication is associated with.)
* The actual object that is the target of the reference (Indicates the patient whose record the detected issue is associated with.)
*/
protected Patient patientTarget;
@ -362,83 +362,83 @@ public class Contraindication extends DomainResource {
*/
@Child(name = "severity", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="high | moderate | low", formalDefinition="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient." )
protected Enumeration<ContraindicationSeverity> severity;
protected Enumeration<DetectedIssueSeverity> severity;
/**
* Indicates the resource representing the current activity or proposed activity that.
* Indicates the resource representing the current activity or proposed activity that is potentially problematic.
*/
@Child(name = "implicated", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Problem resource", formalDefinition="Indicates the resource representing the current activity or proposed activity that." )
@Description(shortDefinition="Problem resource", formalDefinition="Indicates the resource representing the current activity or proposed activity that is potentially problematic." )
protected List<Reference> implicated;
/**
* The actual objects that are the target of the reference (Indicates the resource representing the current activity or proposed activity that.)
* The actual objects that are the target of the reference (Indicates the resource representing the current activity or proposed activity that is potentially problematic.)
*/
protected List<Resource> implicatedTarget;
/**
* A textual explanation of the contraindication.
* A textual explanation of the detected issue.
*/
@Child(name = "detail", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Description and context", formalDefinition="A textual explanation of the contraindication." )
@Description(shortDefinition="Description and context", formalDefinition="A textual explanation of the detected issue." )
protected StringType detail;
/**
* The date or date-time when the contraindication was initially identified.
* The date or date-time when the detected issue was initially identified.
*/
@Child(name = "date", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When identified", formalDefinition="The date or date-time when the contraindication was initially identified." )
@Description(shortDefinition="When identified", formalDefinition="The date or date-time when the detected issue was initially identified." )
protected DateTimeType date;
/**
* Identifies the provider or software that identified the.
* Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.
*/
@Child(name = "author", type = {Practitioner.class, Device.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Who found issue?", formalDefinition="Identifies the provider or software that identified the." )
@Description(shortDefinition="The provider or device that identified the issue", formalDefinition="Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review." )
protected Reference author;
/**
* The actual object that is the target of the reference (Identifies the provider or software that identified the.)
* The actual object that is the target of the reference (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.)
*/
protected Resource authorTarget;
/**
* Business identifier associated with the contraindication record.
* Business identifier associated with the detected issuerecord.
*/
@Child(name = "identifier", type = {Identifier.class}, order=7, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Unique id for the contraindication", formalDefinition="Business identifier associated with the contraindication record." )
@Description(shortDefinition="Unique id for the detected issue", formalDefinition="Business identifier associated with the detected issuerecord." )
protected Identifier identifier;
/**
* The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified.
* The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.
*/
@Child(name = "reference", type = {UriType.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Authority for issue", formalDefinition="The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified." )
@Description(shortDefinition="Authority for issue", formalDefinition="The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified." )
protected UriType reference;
/**
* Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindication from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.
* Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.
*/
@Child(name = "mitigation", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Step taken to address", formalDefinition="Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindication from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action." )
protected List<ContraindicationMitigationComponent> mitigation;
@Description(shortDefinition="Step taken to address", formalDefinition="Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action." )
protected List<DetectedIssueMitigationComponent> mitigation;
private static final long serialVersionUID = -1915322652L;
private static final long serialVersionUID = -403732234L;
/*
* Constructor
*/
public Contraindication() {
public DetectedIssue() {
super();
}
/**
* @return {@link #patient} (Indicates the patient whose record the contraindication is associated with.)
* @return {@link #patient} (Indicates the patient whose record the detected issue is associated with.)
*/
public Reference getPatient() {
if (this.patient == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.patient");
throw new Error("Attempt to auto-create DetectedIssue.patient");
else if (Configuration.doAutoCreate())
this.patient = new Reference(); // cc
return this.patient;
@ -449,29 +449,29 @@ public class Contraindication extends DomainResource {
}
/**
* @param value {@link #patient} (Indicates the patient whose record the contraindication is associated with.)
* @param value {@link #patient} (Indicates the patient whose record the detected issue is associated with.)
*/
public Contraindication setPatient(Reference value) {
public DetectedIssue setPatient(Reference value) {
this.patient = value;
return this;
}
/**
* @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the patient whose record the contraindication is associated with.)
* @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates the patient whose record the detected issue is associated with.)
*/
public Patient getPatientTarget() {
if (this.patientTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.patient");
throw new Error("Attempt to auto-create DetectedIssue.patient");
else if (Configuration.doAutoCreate())
this.patientTarget = new Patient(); // aa
return this.patientTarget;
}
/**
* @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the patient whose record the contraindication is associated with.)
* @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates the patient whose record the detected issue is associated with.)
*/
public Contraindication setPatientTarget(Patient value) {
public DetectedIssue setPatientTarget(Patient value) {
this.patientTarget = value;
return this;
}
@ -482,7 +482,7 @@ public class Contraindication extends DomainResource {
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.category");
throw new Error("Attempt to auto-create DetectedIssue.category");
else if (Configuration.doAutoCreate())
this.category = new CodeableConcept(); // cc
return this.category;
@ -495,7 +495,7 @@ public class Contraindication extends DomainResource {
/**
* @param value {@link #category} (Identifies the general type of issue identified.)
*/
public Contraindication setCategory(CodeableConcept value) {
public DetectedIssue setCategory(CodeableConcept value) {
this.category = value;
return this;
}
@ -503,12 +503,12 @@ public class Contraindication extends DomainResource {
/**
* @return {@link #severity} (Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
*/
public Enumeration<ContraindicationSeverity> getSeverityElement() {
public Enumeration<DetectedIssueSeverity> getSeverityElement() {
if (this.severity == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.severity");
throw new Error("Attempt to auto-create DetectedIssue.severity");
else if (Configuration.doAutoCreate())
this.severity = new Enumeration<ContraindicationSeverity>(new ContraindicationSeverityEnumFactory()); // bb
this.severity = new Enumeration<DetectedIssueSeverity>(new DetectedIssueSeverityEnumFactory()); // bb
return this.severity;
}
@ -523,7 +523,7 @@ public class Contraindication extends DomainResource {
/**
* @param value {@link #severity} (Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
*/
public Contraindication setSeverityElement(Enumeration<ContraindicationSeverity> value) {
public DetectedIssue setSeverityElement(Enumeration<DetectedIssueSeverity> value) {
this.severity = value;
return this;
}
@ -531,26 +531,26 @@ public class Contraindication extends DomainResource {
/**
* @return Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.
*/
public ContraindicationSeverity getSeverity() {
public DetectedIssueSeverity getSeverity() {
return this.severity == null ? null : this.severity.getValue();
}
/**
* @param value Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.
*/
public Contraindication setSeverity(ContraindicationSeverity value) {
public DetectedIssue setSeverity(DetectedIssueSeverity value) {
if (value == null)
this.severity = null;
else {
if (this.severity == null)
this.severity = new Enumeration<ContraindicationSeverity>(new ContraindicationSeverityEnumFactory());
this.severity = new Enumeration<DetectedIssueSeverity>(new DetectedIssueSeverityEnumFactory());
this.severity.setValue(value);
}
return this;
}
/**
* @return {@link #implicated} (Indicates the resource representing the current activity or proposed activity that.)
* @return {@link #implicated} (Indicates the resource representing the current activity or proposed activity that is potentially problematic.)
*/
public List<Reference> getImplicated() {
if (this.implicated == null)
@ -568,7 +568,7 @@ public class Contraindication extends DomainResource {
}
/**
* @return {@link #implicated} (Indicates the resource representing the current activity or proposed activity that.)
* @return {@link #implicated} (Indicates the resource representing the current activity or proposed activity that is potentially problematic.)
*/
// syntactic sugar
public Reference addImplicated() { //3
@ -580,7 +580,7 @@ public class Contraindication extends DomainResource {
}
// syntactic sugar
public Contraindication addImplicated(Reference t) { //3
public DetectedIssue addImplicated(Reference t) { //3
if (t == null)
return this;
if (this.implicated == null)
@ -590,7 +590,7 @@ public class Contraindication extends DomainResource {
}
/**
* @return {@link #implicated} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Indicates the resource representing the current activity or proposed activity that.)
* @return {@link #implicated} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Indicates the resource representing the current activity or proposed activity that is potentially problematic.)
*/
public List<Resource> getImplicatedTarget() {
if (this.implicatedTarget == null)
@ -599,12 +599,12 @@ public class Contraindication extends DomainResource {
}
/**
* @return {@link #detail} (A textual explanation of the contraindication.). This is the underlying object with id, value and extensions. The accessor "getDetail" gives direct access to the value
* @return {@link #detail} (A textual explanation of the detected issue.). This is the underlying object with id, value and extensions. The accessor "getDetail" gives direct access to the value
*/
public StringType getDetailElement() {
if (this.detail == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.detail");
throw new Error("Attempt to auto-create DetectedIssue.detail");
else if (Configuration.doAutoCreate())
this.detail = new StringType(); // bb
return this.detail;
@ -619,24 +619,24 @@ public class Contraindication extends DomainResource {
}
/**
* @param value {@link #detail} (A textual explanation of the contraindication.). This is the underlying object with id, value and extensions. The accessor "getDetail" gives direct access to the value
* @param value {@link #detail} (A textual explanation of the detected issue.). This is the underlying object with id, value and extensions. The accessor "getDetail" gives direct access to the value
*/
public Contraindication setDetailElement(StringType value) {
public DetectedIssue setDetailElement(StringType value) {
this.detail = value;
return this;
}
/**
* @return A textual explanation of the contraindication.
* @return A textual explanation of the detected issue.
*/
public String getDetail() {
return this.detail == null ? null : this.detail.getValue();
}
/**
* @param value A textual explanation of the contraindication.
* @param value A textual explanation of the detected issue.
*/
public Contraindication setDetail(String value) {
public DetectedIssue setDetail(String value) {
if (Utilities.noString(value))
this.detail = null;
else {
@ -648,12 +648,12 @@ public class Contraindication extends DomainResource {
}
/**
* @return {@link #date} (The date or date-time when the contraindication was initially identified.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
* @return {@link #date} (The date or date-time when the detected issue was initially identified.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public DateTimeType getDateElement() {
if (this.date == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.date");
throw new Error("Attempt to auto-create DetectedIssue.date");
else if (Configuration.doAutoCreate())
this.date = new DateTimeType(); // bb
return this.date;
@ -668,24 +668,24 @@ public class Contraindication extends DomainResource {
}
/**
* @param value {@link #date} (The date or date-time when the contraindication was initially identified.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
* @param value {@link #date} (The date or date-time when the detected issue was initially identified.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public Contraindication setDateElement(DateTimeType value) {
public DetectedIssue setDateElement(DateTimeType value) {
this.date = value;
return this;
}
/**
* @return The date or date-time when the contraindication was initially identified.
* @return The date or date-time when the detected issue was initially identified.
*/
public Date getDate() {
return this.date == null ? null : this.date.getValue();
}
/**
* @param value The date or date-time when the contraindication was initially identified.
* @param value The date or date-time when the detected issue was initially identified.
*/
public Contraindication setDate(Date value) {
public DetectedIssue setDate(Date value) {
if (value == null)
this.date = null;
else {
@ -697,12 +697,12 @@ public class Contraindication extends DomainResource {
}
/**
* @return {@link #author} (Identifies the provider or software that identified the.)
* @return {@link #author} (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.)
*/
public Reference getAuthor() {
if (this.author == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.author");
throw new Error("Attempt to auto-create DetectedIssue.author");
else if (Configuration.doAutoCreate())
this.author = new Reference(); // cc
return this.author;
@ -713,35 +713,35 @@ public class Contraindication extends DomainResource {
}
/**
* @param value {@link #author} (Identifies the provider or software that identified the.)
* @param value {@link #author} (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.)
*/
public Contraindication setAuthor(Reference value) {
public DetectedIssue setAuthor(Reference value) {
this.author = value;
return this;
}
/**
* @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the provider or software that identified the.)
* @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.)
*/
public Resource getAuthorTarget() {
return this.authorTarget;
}
/**
* @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the provider or software that identified the.)
* @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.)
*/
public Contraindication setAuthorTarget(Resource value) {
public DetectedIssue setAuthorTarget(Resource value) {
this.authorTarget = value;
return this;
}
/**
* @return {@link #identifier} (Business identifier associated with the contraindication record.)
* @return {@link #identifier} (Business identifier associated with the detected issuerecord.)
*/
public Identifier getIdentifier() {
if (this.identifier == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.identifier");
throw new Error("Attempt to auto-create DetectedIssue.identifier");
else if (Configuration.doAutoCreate())
this.identifier = new Identifier(); // cc
return this.identifier;
@ -752,20 +752,20 @@ public class Contraindication extends DomainResource {
}
/**
* @param value {@link #identifier} (Business identifier associated with the contraindication record.)
* @param value {@link #identifier} (Business identifier associated with the detected issuerecord.)
*/
public Contraindication setIdentifier(Identifier value) {
public DetectedIssue setIdentifier(Identifier value) {
this.identifier = value;
return this;
}
/**
* @return {@link #reference} (The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
* @return {@link #reference} (The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
*/
public UriType getReferenceElement() {
if (this.reference == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Contraindication.reference");
throw new Error("Attempt to auto-create DetectedIssue.reference");
else if (Configuration.doAutoCreate())
this.reference = new UriType(); // bb
return this.reference;
@ -780,24 +780,24 @@ public class Contraindication extends DomainResource {
}
/**
* @param value {@link #reference} (The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
* @param value {@link #reference} (The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
*/
public Contraindication setReferenceElement(UriType value) {
public DetectedIssue setReferenceElement(UriType value) {
this.reference = value;
return this;
}
/**
* @return The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified.
* @return The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.
*/
public String getReference() {
return this.reference == null ? null : this.reference.getValue();
}
/**
* @param value The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified.
* @param value The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.
*/
public Contraindication setReference(String value) {
public DetectedIssue setReference(String value) {
if (Utilities.noString(value))
this.reference = null;
else {
@ -809,61 +809,61 @@ public class Contraindication extends DomainResource {
}
/**
* @return {@link #mitigation} (Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindication from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.)
* @return {@link #mitigation} (Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.)
*/
public List<ContraindicationMitigationComponent> getMitigation() {
public List<DetectedIssueMitigationComponent> getMitigation() {
if (this.mitigation == null)
this.mitigation = new ArrayList<ContraindicationMitigationComponent>();
this.mitigation = new ArrayList<DetectedIssueMitigationComponent>();
return this.mitigation;
}
public boolean hasMitigation() {
if (this.mitigation == null)
return false;
for (ContraindicationMitigationComponent item : this.mitigation)
for (DetectedIssueMitigationComponent item : this.mitigation)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #mitigation} (Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindication from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.)
* @return {@link #mitigation} (Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.)
*/
// syntactic sugar
public ContraindicationMitigationComponent addMitigation() { //3
ContraindicationMitigationComponent t = new ContraindicationMitigationComponent();
public DetectedIssueMitigationComponent addMitigation() { //3
DetectedIssueMitigationComponent t = new DetectedIssueMitigationComponent();
if (this.mitigation == null)
this.mitigation = new ArrayList<ContraindicationMitigationComponent>();
this.mitigation = new ArrayList<DetectedIssueMitigationComponent>();
this.mitigation.add(t);
return t;
}
// syntactic sugar
public Contraindication addMitigation(ContraindicationMitigationComponent t) { //3
public DetectedIssue addMitigation(DetectedIssueMitigationComponent t) { //3
if (t == null)
return this;
if (this.mitigation == null)
this.mitigation = new ArrayList<ContraindicationMitigationComponent>();
this.mitigation = new ArrayList<DetectedIssueMitigationComponent>();
this.mitigation.add(t);
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("patient", "Reference(Patient)", "Indicates the patient whose record the contraindication is associated with.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("patient", "Reference(Patient)", "Indicates the patient whose record the detected issue is associated with.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("category", "CodeableConcept", "Identifies the general type of issue identified.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("severity", "code", "Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.", 0, java.lang.Integer.MAX_VALUE, severity));
childrenList.add(new Property("implicated", "Reference(Any)", "Indicates the resource representing the current activity or proposed activity that.", 0, java.lang.Integer.MAX_VALUE, implicated));
childrenList.add(new Property("detail", "string", "A textual explanation of the contraindication.", 0, java.lang.Integer.MAX_VALUE, detail));
childrenList.add(new Property("date", "dateTime", "The date or date-time when the contraindication was initially identified.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("author", "Reference(Practitioner|Device)", "Identifies the provider or software that identified the.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("identifier", "Identifier", "Business identifier associated with the contraindication record.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("reference", "uri", "The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified.", 0, java.lang.Integer.MAX_VALUE, reference));
childrenList.add(new Property("mitigation", "", "Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindication from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.", 0, java.lang.Integer.MAX_VALUE, mitigation));
childrenList.add(new Property("implicated", "Reference(Any)", "Indicates the resource representing the current activity or proposed activity that is potentially problematic.", 0, java.lang.Integer.MAX_VALUE, implicated));
childrenList.add(new Property("detail", "string", "A textual explanation of the detected issue.", 0, java.lang.Integer.MAX_VALUE, detail));
childrenList.add(new Property("date", "dateTime", "The date or date-time when the detected issue was initially identified.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("author", "Reference(Practitioner|Device)", "Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("identifier", "Identifier", "Business identifier associated with the detected issuerecord.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("reference", "uri", "The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.", 0, java.lang.Integer.MAX_VALUE, reference));
childrenList.add(new Property("mitigation", "", "Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.", 0, java.lang.Integer.MAX_VALUE, mitigation));
}
public Contraindication copy() {
Contraindication dst = new Contraindication();
public DetectedIssue copy() {
DetectedIssue dst = new DetectedIssue();
copyValues(dst);
dst.patient = patient == null ? null : patient.copy();
dst.category = category == null ? null : category.copy();
@ -879,14 +879,14 @@ public class Contraindication extends DomainResource {
dst.identifier = identifier == null ? null : identifier.copy();
dst.reference = reference == null ? null : reference.copy();
if (mitigation != null) {
dst.mitigation = new ArrayList<ContraindicationMitigationComponent>();
for (ContraindicationMitigationComponent i : mitigation)
dst.mitigation = new ArrayList<DetectedIssueMitigationComponent>();
for (DetectedIssueMitigationComponent i : mitigation)
dst.mitigation.add(i.copy());
};
return dst;
}
protected Contraindication typedCopy() {
protected DetectedIssue typedCopy() {
return copy();
}
@ -894,9 +894,9 @@ public class Contraindication extends DomainResource {
public boolean equalsDeep(Base other) {
if (!super.equalsDeep(other))
return false;
if (!(other instanceof Contraindication))
if (!(other instanceof DetectedIssue))
return false;
Contraindication o = (Contraindication) other;
DetectedIssue o = (DetectedIssue) other;
return compareDeep(patient, o.patient, true) && compareDeep(category, o.category, true) && compareDeep(severity, o.severity, true)
&& compareDeep(implicated, o.implicated, true) && compareDeep(detail, o.detail, true) && compareDeep(date, o.date, true)
&& compareDeep(author, o.author, true) && compareDeep(identifier, o.identifier, true) && compareDeep(reference, o.reference, true)
@ -907,9 +907,9 @@ public class Contraindication extends DomainResource {
public boolean equalsShallow(Base other) {
if (!super.equalsShallow(other))
return false;
if (!(other instanceof Contraindication))
if (!(other instanceof DetectedIssue))
return false;
Contraindication o = (Contraindication) other;
DetectedIssue o = (DetectedIssue) other;
return compareValues(severity, o.severity, true) && compareValues(detail, o.detail, true) && compareValues(date, o.date, true)
&& compareValues(reference, o.reference, true);
}
@ -924,20 +924,20 @@ public class Contraindication extends DomainResource {
@Override
public ResourceType getResourceType() {
return ResourceType.Contraindication;
return ResourceType.DetectedIssue;
}
@SearchParamDefinition(name="date", path="Contraindication.date", description="When identified", type="date" )
@SearchParamDefinition(name="date", path="DetectedIssue.date", description="When identified", type="date" )
public static final String SP_DATE = "date";
@SearchParamDefinition(name="identifier", path="Contraindication.identifier", description="Unique id for the contraindication", type="token" )
@SearchParamDefinition(name="identifier", path="DetectedIssue.identifier", description="Unique id for the detected issue", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="patient", path="Contraindication.patient", description="Associated patient", type="reference" )
@SearchParamDefinition(name="patient", path="DetectedIssue.patient", description="Associated patient", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="author", path="Contraindication.author", description="Who found issue?", type="reference" )
@SearchParamDefinition(name="author", path="DetectedIssue.author", description="The provider or device that identified the issue", type="reference" )
public static final String SP_AUTHOR = "author";
@SearchParamDefinition(name="implicated", path="Contraindication.implicated", description="Problem resource", type="reference" )
@SearchParamDefinition(name="implicated", path="DetectedIssue.implicated", description="Problem resource", type="reference" )
public static final String SP_IMPLICATED = "implicated";
@SearchParamDefinition(name="category", path="Contraindication.category", description="E.g. Drug-drug, duplicate therapy, etc.", type="token" )
@SearchParamDefinition(name="category", path="DetectedIssue.category", description="E.g. Drug-drug, duplicate therapy, etc.", type="token" )
public static final String SP_CATEGORY = "category";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -1107,6 +1107,8 @@ public class Device extends DomainResource {
public static final String SP_UDI = "udi";
@SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" )
public static final String SP_TYPE = "type";
@SearchParamDefinition(name="url", path="Device.url", description="Network address to contact device", type="uri" )
public static final String SP_URL = "url";
@SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" )
public static final String SP_MANUFACTURER = "manufacturer";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;

View File

@ -29,20 +29,18 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatus;
import org.hl7.fhir.instance.model.Enumerations.DocumentReferenceStatusEnumFactory;
import org.hl7.fhir.instance.model.annotations.Block;
import org.hl7.fhir.instance.model.annotations.Child;
import org.hl7.fhir.instance.model.annotations.Description;
import java.util.*;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.Enumerations.*;
import org.hl7.fhir.instance.model.annotations.ResourceDef;
import org.hl7.fhir.instance.model.annotations.SearchParamDefinition;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.instance.model.annotations.Child;
import org.hl7.fhir.instance.model.annotations.Description;
import org.hl7.fhir.instance.model.annotations.Block;
import org.hl7.fhir.instance.model.api.*;
/**
* A manifest that defines a set of documents.
*/
@ -164,7 +162,7 @@ public class DocumentManifest extends DomainResource {
* Related identifier to this DocumentManifest. If both id and ref are present they shall refer to the same thing.
*/
@Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Related Identifier", formalDefinition="Related identifier to this DocumentManifest. If both id and ref are present they shall refer to the same thing." )
@Description(shortDefinition="Identifiers of things that are related", formalDefinition="Related identifier to this DocumentManifest. If both id and ref are present they shall refer to the same thing." )
protected Identifier identifier;
/**
@ -378,10 +376,10 @@ public class DocumentManifest extends DomainResource {
protected StringType description;
/**
* The manifest list.
* The list of Documents included in the manifest.
*/
@Child(name = "content", type = {}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Contents of the manifest", formalDefinition="The manifest list." )
@Description(shortDefinition="The items included", formalDefinition="The list of Documents included in the manifest." )
protected List<DocumentManifestContentComponent> content;
/**
@ -826,7 +824,7 @@ public class DocumentManifest extends DomainResource {
}
/**
* @return {@link #content} (The manifest list.)
* @return {@link #content} (The list of Documents included in the manifest.)
*/
public List<DocumentManifestContentComponent> getContent() {
if (this.content == null)
@ -844,7 +842,7 @@ public class DocumentManifest extends DomainResource {
}
/**
* @return {@link #content} (The manifest list.)
* @return {@link #content} (The list of Documents included in the manifest.)
*/
// syntactic sugar
public DocumentManifestContentComponent addContent() { //3
@ -917,7 +915,7 @@ public class DocumentManifest extends DomainResource {
childrenList.add(new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, java.lang.Integer.MAX_VALUE, source));
childrenList.add(new Property("status", "code", "The status of this document manifest.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("content", "", "The manifest list.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("content", "", "The list of Documents included in the manifest.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related));
}
@ -1003,30 +1001,30 @@ public class DocumentManifest extends DomainResource {
@SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier|DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="Identifiers of things that are related", type="token" )
public static final String SP_RELATEDID = "related-id";
@SearchParamDefinition(name="content-ref", path="DocumentManifest.content.pReference", description="Contents of this set of documents", type="reference" )
public static final String SP_CONTENTREF = "content-ref";
@SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" )
public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference" )
public static final String SP_AUTHOR = "author";
@SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" )
public static final String SP_CREATED = "created";
@SearchParamDefinition(name="relatedref", path="DocumentManifest.related.ref", description="Related Resource", type="reference" )
public static final String SP_RELATEDREF = "relatedref";
@SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" )
public static final String SP_DESCRIPTION = "description";
@SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="uri" )
public static final String SP_SOURCE = "source";
@SearchParamDefinition(name="type", path="DocumentManifest.type", description="What kind of document set this is", type="token" )
public static final String SP_TYPE = "type";
@SearchParamDefinition(name="relatedid", path="DocumentManifest.related.identifier", description="Related Identifier", type="token" )
public static final String SP_RELATEDID = "relatedid";
@SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference" )
public static final String SP_RELATEDREF = "related-ref";
@SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference" )
public static final String SP_RECIPIENT = "recipient";
@SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superseded | entered-in-error", type="token" )
public static final String SP_STATUS = "status";
@SearchParamDefinition(name="contentref", path="DocumentManifest.content.pReference", description="Contents of this set of documents", type="reference" )
public static final String SP_CONTENTREF = "contentref";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -314,6 +314,148 @@ public class DocumentReference extends DomainResource {
;
}
}
@Block()
public static class DocumentReferenceContentComponent extends BackboneElement implements IBaseBackboneElement {
/**
* The document or url to the document along with critical metadata to prove content has integrity.
*/
@Child(name = "attachment", type = {Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Where to access the document", formalDefinition="The document or url to the document along with critical metadata to prove content has integrity." )
protected Attachment attachment;
/**
* An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.
*/
@Child(name = "format", type = {Coding.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Format/content rules for the document", formalDefinition="An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType." )
protected List<Coding> format;
private static final long serialVersionUID = -1412643085L;
/*
* Constructor
*/
public DocumentReferenceContentComponent() {
super();
}
/*
* Constructor
*/
public DocumentReferenceContentComponent(Attachment attachment) {
super();
this.attachment = attachment;
}
/**
* @return {@link #attachment} (The document or url to the document along with critical metadata to prove content has integrity.)
*/
public Attachment getAttachment() {
if (this.attachment == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DocumentReferenceContentComponent.attachment");
else if (Configuration.doAutoCreate())
this.attachment = new Attachment(); // cc
return this.attachment;
}
public boolean hasAttachment() {
return this.attachment != null && !this.attachment.isEmpty();
}
/**
* @param value {@link #attachment} (The document or url to the document along with critical metadata to prove content has integrity.)
*/
public DocumentReferenceContentComponent setAttachment(Attachment value) {
this.attachment = value;
return this;
}
/**
* @return {@link #format} (An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.)
*/
public List<Coding> getFormat() {
if (this.format == null)
this.format = new ArrayList<Coding>();
return this.format;
}
public boolean hasFormat() {
if (this.format == null)
return false;
for (Coding item : this.format)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #format} (An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.)
*/
// syntactic sugar
public Coding addFormat() { //3
Coding t = new Coding();
if (this.format == null)
this.format = new ArrayList<Coding>();
this.format.add(t);
return t;
}
// syntactic sugar
public DocumentReferenceContentComponent addFormat(Coding t) { //3
if (t == null)
return this;
if (this.format == null)
this.format = new ArrayList<Coding>();
this.format.add(t);
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("attachment", "Attachment", "The document or url to the document along with critical metadata to prove content has integrity.", 0, java.lang.Integer.MAX_VALUE, attachment));
childrenList.add(new Property("format", "Coding", "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.", 0, java.lang.Integer.MAX_VALUE, format));
}
public DocumentReferenceContentComponent copy() {
DocumentReferenceContentComponent dst = new DocumentReferenceContentComponent();
copyValues(dst);
dst.attachment = attachment == null ? null : attachment.copy();
if (format != null) {
dst.format = new ArrayList<Coding>();
for (Coding i : format)
dst.format.add(i.copy());
};
return dst;
}
@Override
public boolean equalsDeep(Base other) {
if (!super.equalsDeep(other))
return false;
if (!(other instanceof DocumentReferenceContentComponent))
return false;
DocumentReferenceContentComponent o = (DocumentReferenceContentComponent) other;
return compareDeep(attachment, o.attachment, true) && compareDeep(format, o.format, true);
}
@Override
public boolean equalsShallow(Base other) {
if (!super.equalsShallow(other))
return false;
if (!(other instanceof DocumentReferenceContentComponent))
return false;
DocumentReferenceContentComponent o = (DocumentReferenceContentComponent) other;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && (attachment == null || attachment.isEmpty()) && (format == null || format.isEmpty())
;
}
}
@Block()
@ -362,7 +504,7 @@ public class DocumentReference extends DomainResource {
* The Patient Information as known when the document was published. May be a reference to a version specific, or contained.
*/
@Child(name = "sourcePatientInfo", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Source patient info", formalDefinition="The Patient Information as known when the document was published. May be a reference to a version specific, or contained." )
@Description(shortDefinition="Patient demographics from source", formalDefinition="The Patient Information as known when the document was published. May be a reference to a version specific, or contained." )
protected Reference sourcePatientInfo;
/**
@ -696,7 +838,7 @@ public class DocumentReference extends DomainResource {
* Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.
*/
@Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Related Identifier", formalDefinition="Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing." )
@Description(shortDefinition="Identifer of related objects or events", formalDefinition="Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing." )
protected Identifier identifier;
/**
@ -851,30 +993,23 @@ public class DocumentReference extends DomainResource {
protected Resource subjectTarget;
/**
* Specifies the particular kind of document. This usually equates to the purpose of making the document. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.).
* Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Kind of document", formalDefinition="Specifies the particular kind of document. This usually equates to the purpose of making the document. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.)." )
@Description(shortDefinition="Kind of document (LOINC if possible)", formalDefinition="Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced." )
protected CodeableConcept type;
/**
* A categorization for the type of document - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.
* A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.
*/
@Child(name = "class", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Categorization of document", formalDefinition="A categorization for the type of document - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type." )
@Description(shortDefinition="Categorization of document", formalDefinition="A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type." )
protected CodeableConcept class_;
/**
* An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.
*/
@Child(name = "format", type = {Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Format/content rules for the document", formalDefinition="An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType." )
protected List<Coding> format;
/**
* Identifies who is responsible for adding the information to the document.
*/
@Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Who and/or what authored the document", formalDefinition="Identifies who is responsible for adding the information to the document." )
protected List<Reference> author;
/**
@ -886,7 +1021,7 @@ public class DocumentReference extends DomainResource {
/**
* Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.
*/
@Child(name = "custodian", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true)
@Child(name = "custodian", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Org which maintains the document", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document." )
protected Reference custodian;
@ -898,7 +1033,7 @@ public class DocumentReference extends DomainResource {
/**
* Which person or organization authenticates that this document is valid.
*/
@Child(name = "authenticator", type = {Practitioner.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=true)
@Child(name = "authenticator", type = {Practitioner.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Who/What authenticated the document", formalDefinition="Which person or organization authenticates that this document is valid." )
protected Reference authenticator;
@ -910,67 +1045,67 @@ public class DocumentReference extends DomainResource {
/**
* When the document was created.
*/
@Child(name = "created", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true)
@Child(name = "created", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Document creation time", formalDefinition="When the document was created." )
protected DateTimeType created;
/**
* When the document reference was created.
*/
@Child(name = "indexed", type = {InstantType.class}, order=10, min=1, max=1, modifier=false, summary=true)
@Child(name = "indexed", type = {InstantType.class}, order=9, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="When this document reference created", formalDefinition="When the document reference was created." )
protected InstantType indexed;
/**
* The status of this document reference.
*/
@Child(name = "status", type = {CodeType.class}, order=11, min=1, max=1, modifier=true, summary=true)
@Child(name = "status", type = {CodeType.class}, order=10, min=1, max=1, modifier=true, summary=true)
@Description(shortDefinition="current | superseded | entered-in-error", formalDefinition="The status of this document reference." )
protected Enumeration<DocumentReferenceStatus> status;
/**
* The status of the underlying document.
*/
@Child(name = "docStatus", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=true)
@Child(name = "docStatus", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="preliminary | final | appended | amended | entered-in-error", formalDefinition="The status of the underlying document." )
protected CodeableConcept docStatus;
/**
* Relationships that this document has with other document references that already exist.
*/
@Child(name = "relatesTo", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=true)
@Child(name = "relatesTo", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=true)
@Description(shortDefinition="Relationships to other documents", formalDefinition="Relationships that this document has with other document references that already exist." )
protected List<DocumentReferenceRelatesToComponent> relatesTo;
/**
* Human-readable description of the source document. This is sometimes known as the "title".
*/
@Child(name = "description", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=true)
@Child(name = "description", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the \"title\"." )
protected StringType description;
/**
* A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security is the security labels of the reference to the document, while DocumentReference.securityLabel is the security labels on the document it refers to.
*/
@Child(name = "securityLabel", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "securityLabel", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Document security-tags", formalDefinition="A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security is the security labels of the reference to the document, while DocumentReference.securityLabel is the security labels on the document it refers to." )
protected List<CodeableConcept> securityLabel;
/**
* The document or url to the document along with critical metadata to prove content has integrity.
* The document and format referenced. May be multiple content each with a different format.
*/
@Child(name = "content", type = {Attachment.class}, order=16, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Where to access the document", formalDefinition="The document or url to the document along with critical metadata to prove content has integrity." )
protected List<Attachment> content;
@Child(name = "content", type = {}, order=15, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Document referenced", formalDefinition="The document and format referenced. May be multiple content each with a different format." )
protected List<DocumentReferenceContentComponent> content;
/**
* The clinical context in which the document was prepared.
*/
@Child(name = "context", type = {}, order=17, min=0, max=1, modifier=false, summary=true)
@Child(name = "context", type = {}, order=16, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Clinical context of document", formalDefinition="The clinical context in which the document was prepared." )
protected DocumentReferenceContextComponent context;
private static final long serialVersionUID = 2074994054L;
private static final long serialVersionUID = -1009325322L;
/*
* Constructor
@ -1093,7 +1228,7 @@ public class DocumentReference extends DomainResource {
}
/**
* @return {@link #type} (Specifies the particular kind of document. This usually equates to the purpose of making the document. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.).)
* @return {@link #type} (Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.)
*/
public CodeableConcept getType() {
if (this.type == null)
@ -1109,7 +1244,7 @@ public class DocumentReference extends DomainResource {
}
/**
* @param value {@link #type} (Specifies the particular kind of document. This usually equates to the purpose of making the document. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.).)
* @param value {@link #type} (Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.)
*/
public DocumentReference setType(CodeableConcept value) {
this.type = value;
@ -1117,7 +1252,7 @@ public class DocumentReference extends DomainResource {
}
/**
* @return {@link #class_} (A categorization for the type of document - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.)
* @return {@link #class_} (A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.)
*/
public CodeableConcept getClass_() {
if (this.class_ == null)
@ -1133,53 +1268,13 @@ public class DocumentReference extends DomainResource {
}
/**
* @param value {@link #class_} (A categorization for the type of document - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.)
* @param value {@link #class_} (A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.)
*/
public DocumentReference setClass_(CodeableConcept value) {
this.class_ = value;
return this;
}
/**
* @return {@link #format} (An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.)
*/
public List<Coding> getFormat() {
if (this.format == null)
this.format = new ArrayList<Coding>();
return this.format;
}
public boolean hasFormat() {
if (this.format == null)
return false;
for (Coding item : this.format)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #format} (An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.)
*/
// syntactic sugar
public Coding addFormat() { //3
Coding t = new Coding();
if (this.format == null)
this.format = new ArrayList<Coding>();
this.format.add(t);
return t;
}
// syntactic sugar
public DocumentReference addFormat(Coding t) { //3
if (t == null)
return this;
if (this.format == null)
this.format = new ArrayList<Coding>();
this.format.add(t);
return this;
}
/**
* @return {@link #author} (Identifies who is responsible for adding the information to the document.)
*/
@ -1605,41 +1700,41 @@ public class DocumentReference extends DomainResource {
}
/**
* @return {@link #content} (The document or url to the document along with critical metadata to prove content has integrity.)
* @return {@link #content} (The document and format referenced. May be multiple content each with a different format.)
*/
public List<Attachment> getContent() {
public List<DocumentReferenceContentComponent> getContent() {
if (this.content == null)
this.content = new ArrayList<Attachment>();
this.content = new ArrayList<DocumentReferenceContentComponent>();
return this.content;
}
public boolean hasContent() {
if (this.content == null)
return false;
for (Attachment item : this.content)
for (DocumentReferenceContentComponent item : this.content)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #content} (The document or url to the document along with critical metadata to prove content has integrity.)
* @return {@link #content} (The document and format referenced. May be multiple content each with a different format.)
*/
// syntactic sugar
public Attachment addContent() { //3
Attachment t = new Attachment();
public DocumentReferenceContentComponent addContent() { //3
DocumentReferenceContentComponent t = new DocumentReferenceContentComponent();
if (this.content == null)
this.content = new ArrayList<Attachment>();
this.content = new ArrayList<DocumentReferenceContentComponent>();
this.content.add(t);
return t;
}
// syntactic sugar
public DocumentReference addContent(Attachment t) { //3
public DocumentReference addContent(DocumentReferenceContentComponent t) { //3
if (t == null)
return this;
if (this.content == null)
this.content = new ArrayList<Attachment>();
this.content = new ArrayList<DocumentReferenceContentComponent>();
this.content.add(t);
return this;
}
@ -1673,9 +1768,8 @@ public class DocumentReference extends DomainResource {
childrenList.add(new Property("masterIdentifier", "Identifier", "Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.", 0, java.lang.Integer.MAX_VALUE, masterIdentifier));
childrenList.add(new Property("identifier", "Identifier", "Other identifiers associated with the document, including version independent identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("type", "CodeableConcept", "Specifies the particular kind of document. This usually equates to the purpose of making the document. It is recommended that the value Set be drawn from a coding scheme providing a fine level of granularity such as LOINC. (e.g. Patient Summary, Discharge Summary, Prescription, etc.).", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("class", "CodeableConcept", "A categorization for the type of document - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.", 0, java.lang.Integer.MAX_VALUE, class_));
childrenList.add(new Property("format", "Coding", "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.", 0, java.lang.Integer.MAX_VALUE, format));
childrenList.add(new Property("type", "CodeableConcept", "Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("class", "CodeableConcept", "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.", 0, java.lang.Integer.MAX_VALUE, class_));
childrenList.add(new Property("author", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Identifies who is responsible for adding the information to the document.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.", 0, java.lang.Integer.MAX_VALUE, custodian));
childrenList.add(new Property("authenticator", "Reference(Practitioner|Organization)", "Which person or organization authenticates that this document is valid.", 0, java.lang.Integer.MAX_VALUE, authenticator));
@ -1686,7 +1780,7 @@ public class DocumentReference extends DomainResource {
childrenList.add(new Property("relatesTo", "", "Relationships that this document has with other document references that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo));
childrenList.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("securityLabel", "CodeableConcept", "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security is the security labels of the reference to the document, while DocumentReference.securityLabel is the security labels on the document it refers to.", 0, java.lang.Integer.MAX_VALUE, securityLabel));
childrenList.add(new Property("content", "Attachment", "The document or url to the document along with critical metadata to prove content has integrity.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("content", "", "The document and format referenced. May be multiple content each with a different format.", 0, java.lang.Integer.MAX_VALUE, content));
childrenList.add(new Property("context", "", "The clinical context in which the document was prepared.", 0, java.lang.Integer.MAX_VALUE, context));
}
@ -1702,11 +1796,6 @@ public class DocumentReference extends DomainResource {
dst.subject = subject == null ? null : subject.copy();
dst.type = type == null ? null : type.copy();
dst.class_ = class_ == null ? null : class_.copy();
if (format != null) {
dst.format = new ArrayList<Coding>();
for (Coding i : format)
dst.format.add(i.copy());
};
if (author != null) {
dst.author = new ArrayList<Reference>();
for (Reference i : author)
@ -1730,8 +1819,8 @@ public class DocumentReference extends DomainResource {
dst.securityLabel.add(i.copy());
};
if (content != null) {
dst.content = new ArrayList<Attachment>();
for (Attachment i : content)
dst.content = new ArrayList<DocumentReferenceContentComponent>();
for (DocumentReferenceContentComponent i : content)
dst.content.add(i.copy());
};
dst.context = context == null ? null : context.copy();
@ -1751,11 +1840,11 @@ public class DocumentReference extends DomainResource {
DocumentReference o = (DocumentReference) other;
return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true)
&& compareDeep(subject, o.subject, true) && compareDeep(type, o.type, true) && compareDeep(class_, o.class_, true)
&& compareDeep(format, o.format, true) && compareDeep(author, o.author, true) && compareDeep(custodian, o.custodian, true)
&& compareDeep(authenticator, o.authenticator, true) && compareDeep(created, o.created, true) && compareDeep(indexed, o.indexed, true)
&& compareDeep(status, o.status, true) && compareDeep(docStatus, o.docStatus, true) && compareDeep(relatesTo, o.relatesTo, true)
&& compareDeep(description, o.description, true) && compareDeep(securityLabel, o.securityLabel, true)
&& compareDeep(content, o.content, true) && compareDeep(context, o.context, true);
&& compareDeep(author, o.author, true) && compareDeep(custodian, o.custodian, true) && compareDeep(authenticator, o.authenticator, true)
&& compareDeep(created, o.created, true) && compareDeep(indexed, o.indexed, true) && compareDeep(status, o.status, true)
&& compareDeep(docStatus, o.docStatus, true) && compareDeep(relatesTo, o.relatesTo, true) && compareDeep(description, o.description, true)
&& compareDeep(securityLabel, o.securityLabel, true) && compareDeep(content, o.content, true) && compareDeep(context, o.context, true)
;
}
@Override
@ -1772,12 +1861,11 @@ public class DocumentReference extends DomainResource {
public boolean isEmpty() {
return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty())
&& (subject == null || subject.isEmpty()) && (type == null || type.isEmpty()) && (class_ == null || class_.isEmpty())
&& (format == null || format.isEmpty()) && (author == null || author.isEmpty()) && (custodian == null || custodian.isEmpty())
&& (authenticator == null || authenticator.isEmpty()) && (created == null || created.isEmpty())
&& (indexed == null || indexed.isEmpty()) && (status == null || status.isEmpty()) && (docStatus == null || docStatus.isEmpty())
&& (relatesTo == null || relatesTo.isEmpty()) && (description == null || description.isEmpty())
&& (securityLabel == null || securityLabel.isEmpty()) && (content == null || content.isEmpty())
&& (context == null || context.isEmpty());
&& (author == null || author.isEmpty()) && (custodian == null || custodian.isEmpty()) && (authenticator == null || authenticator.isEmpty())
&& (created == null || created.isEmpty()) && (indexed == null || indexed.isEmpty()) && (status == null || status.isEmpty())
&& (docStatus == null || docStatus.isEmpty()) && (relatesTo == null || relatesTo.isEmpty())
&& (description == null || description.isEmpty()) && (securityLabel == null || securityLabel.isEmpty())
&& (content == null || content.isEmpty()) && (context == null || context.isEmpty());
}
@Override
@ -1791,16 +1879,14 @@ public class DocumentReference extends DomainResource {
public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="description", path="DocumentReference.description", description="Human-readable description (title)", type="string" )
public static final String SP_DESCRIPTION = "description";
@SearchParamDefinition(name="language", path="DocumentReference.content.language", description="Human language of the content (BCP-47)", type="token" )
@SearchParamDefinition(name="language", path="DocumentReference.content.attachment.language", description="Human language of the content (BCP-47)", type="token" )
public static final String SP_LANGUAGE = "language";
@SearchParamDefinition(name="type", path="DocumentReference.type", description="Kind of document", type="token" )
@SearchParamDefinition(name="type", path="DocumentReference.type", description="Kind of document (LOINC if possible)", type="token" )
public static final String SP_TYPE = "type";
@SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="replaces | transforms | signs | appends", type="token" )
public static final String SP_RELATION = "relation";
@SearchParamDefinition(name="setting", path="DocumentReference.context.practiceSetting", description="Additional details about where the content was created (e.g. clinical specialty)", type="token" )
public static final String SP_SETTING = "setting";
@SearchParamDefinition(name="relatedid", path="DocumentReference.context.related.identifier", description="Related Identifier", type="token" )
public static final String SP_RELATEDID = "relatedid";
@SearchParamDefinition(name="patient", path="DocumentReference.subject", description="Who|what is the subject of the document", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="relationship", path="", description="Combination of relation and relatesTo", type="composite" )
@ -1815,6 +1901,8 @@ public class DocumentReference extends DomainResource {
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="period", path="DocumentReference.context.period", description="Time of service that is being documented", type="date" )
public static final String SP_PERIOD = "period";
@SearchParamDefinition(name="related-id", path="DocumentReference.context.related.identifier", description="Identifer of related objects or events", type="token" )
public static final String SP_RELATEDID = "related-id";
@SearchParamDefinition(name="custodian", path="DocumentReference.custodian", description="Org which maintains the document", type="reference" )
public static final String SP_CUSTODIAN = "custodian";
@SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="When this document reference created", type="date" )
@ -1823,13 +1911,13 @@ public class DocumentReference extends DomainResource {
public static final String SP_AUTHOR = "author";
@SearchParamDefinition(name="created", path="DocumentReference.created", description="Document creation time", type="date" )
public static final String SP_CREATED = "created";
@SearchParamDefinition(name="format", path="DocumentReference.format", description="Format/content rules for the document", type="token" )
@SearchParamDefinition(name="format", path="DocumentReference.content.format", description="Format/content rules for the document", type="token" )
public static final String SP_FORMAT = "format";
@SearchParamDefinition(name="relatedref", path="DocumentReference.context.related.ref", description="Related Resource", type="reference" )
public static final String SP_RELATEDREF = "relatedref";
@SearchParamDefinition(name="encounter", path="DocumentReference.context.encounter", description="Context of the document content", type="reference" )
public static final String SP_ENCOUNTER = "encounter";
@SearchParamDefinition(name="location", path="DocumentReference.content.url", description="Uri where the data can be found", type="uri" )
@SearchParamDefinition(name="related-ref", path="DocumentReference.context.related.ref", description="Related Resource", type="reference" )
public static final String SP_RELATEDREF = "related-ref";
@SearchParamDefinition(name="location", path="DocumentReference.content.attachment.url", description="Uri where the data can be found", type="uri" )
public static final String SP_LOCATION = "location";
@SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="Target of the relationship", type="reference" )
public static final String SP_RELATESTO = "relatesto";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import org.hl7.fhir.instance.model.annotations.DatatypeDef;
import org.hl7.fhir.instance.model.annotations.Block;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -188,7 +188,7 @@ public class Encounter extends DomainResource {
*/
AMBULATORY,
/**
* An encounter where the patient needs urgent care
* An encounter in the Emergency Care Department
*/
EMERGENCY,
/**
@ -271,7 +271,7 @@ public class Encounter extends DomainResource {
case INPATIENT: return "An encounter during which the patient is hospitalized and stays overnight";
case OUTPATIENT: return "An encounter during which the patient is not hospitalized overnight";
case AMBULATORY: return "An encounter where the patient visits the practitioner in his/her office, e.g. a G.P. visit";
case EMERGENCY: return "An encounter where the patient needs urgent care";
case EMERGENCY: return "An encounter in the Emergency Care Department";
case HOME: return "An encounter where the practitioner visits the patient at his/her home";
case FIELD: return "An encounter taking place outside the regular environment for giving care";
case DAYTIME: return "An encounter where the patient needs more prolonged treatment or investigations than outpatients, but who do not need to stay in the hospital overnight";
@ -350,13 +350,21 @@ public class Encounter extends DomainResource {
*/
PLANNED,
/**
* The patient is currently at this location, or was between the period specified
* The patient is currently at this location, or was between the period specified
A system may update these records when the patient leaves the location to either reserved, or completed
*/
PRESENT,
ACTIVE,
/**
* This location is held empty for this patient
*/
RESERVED,
/**
* The patient was at this location during the period specified
Not to be used when the patient is currently at the location
*/
COMPLETED,
/**
* added to help the parsers
*/
@ -366,41 +374,47 @@ public class Encounter extends DomainResource {
return null;
if ("planned".equals(codeString))
return PLANNED;
if ("present".equals(codeString))
return PRESENT;
if ("active".equals(codeString))
return ACTIVE;
if ("reserved".equals(codeString))
return RESERVED;
if ("completed".equals(codeString))
return COMPLETED;
throw new Exception("Unknown EncounterLocationStatus code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case PLANNED: return "planned";
case PRESENT: return "present";
case ACTIVE: return "active";
case RESERVED: return "reserved";
case COMPLETED: return "completed";
default: return "?";
}
}
public String getSystem() {
switch (this) {
case PLANNED: return "http://hl7.org/fhir/encounter-location-status";
case PRESENT: return "http://hl7.org/fhir/encounter-location-status";
case ACTIVE: return "http://hl7.org/fhir/encounter-location-status";
case RESERVED: return "http://hl7.org/fhir/encounter-location-status";
case COMPLETED: return "http://hl7.org/fhir/encounter-location-status";
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case PLANNED: return "The patient is planned to be moved to this location at some point in the future";
case PRESENT: return "The patient is currently at this location, or was between the period specified";
case ACTIVE: return "The patient is currently at this location, or was between the period specified\n\nA system may update these records when the patient leaves the location to either reserved, or completed";
case RESERVED: return "This location is held empty for this patient";
case COMPLETED: return "The patient was at this location during the period specified\n\nNot to be used when the patient is currently at the location";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case PLANNED: return "Planned";
case PRESENT: return "Present";
case ACTIVE: return "Active";
case RESERVED: return "Reserved";
case COMPLETED: return "Completed";
default: return "?";
}
}
@ -413,19 +427,23 @@ public class Encounter extends DomainResource {
return null;
if ("planned".equals(codeString))
return EncounterLocationStatus.PLANNED;
if ("present".equals(codeString))
return EncounterLocationStatus.PRESENT;
if ("active".equals(codeString))
return EncounterLocationStatus.ACTIVE;
if ("reserved".equals(codeString))
return EncounterLocationStatus.RESERVED;
if ("completed".equals(codeString))
return EncounterLocationStatus.COMPLETED;
throw new IllegalArgumentException("Unknown EncounterLocationStatus code '"+codeString+"'");
}
public String toCode(EncounterLocationStatus code) {
if (code == EncounterLocationStatus.PLANNED)
return "planned";
if (code == EncounterLocationStatus.PRESENT)
return "present";
if (code == EncounterLocationStatus.ACTIVE)
return "active";
if (code == EncounterLocationStatus.RESERVED)
return "reserved";
if (code == EncounterLocationStatus.COMPLETED)
return "completed";
return "?";
}
}
@ -1403,7 +1421,7 @@ public class Encounter extends DomainResource {
* The status of the participants presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.
*/
@Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="planned | present | reserved", formalDefinition="The status of the participants presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time." )
@Description(shortDefinition="planned | active | reserved | completed", formalDefinition="The status of the participants presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time." )
protected Enumeration<EncounterLocationStatus> status;
/**
@ -1626,10 +1644,17 @@ public class Encounter extends DomainResource {
@Description(shortDefinition="Specific type of encounter", formalDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." )
protected List<CodeableConcept> type;
/**
* Indicates the urgency of the encounter.
*/
@Child(name = "priority", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Indicates the urgency of the encounter", formalDefinition="Indicates the urgency of the encounter." )
protected CodeableConcept priority;
/**
* The patient present at the encounter.
*/
@Child(name = "patient", type = {Patient.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Child(name = "patient", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The patient present at the encounter", formalDefinition="The patient present at the encounter." )
protected Reference patient;
@ -1641,7 +1666,7 @@ public class Encounter extends DomainResource {
/**
* Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as govt reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).
*/
@Child(name = "episodeOfCare", type = {EpisodeOfCare.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "episodeOfCare", type = {EpisodeOfCare.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Episode(s) of care that this encounter should be recorded against", formalDefinition="Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as govt reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)." )
protected List<Reference> episodeOfCare;
/**
@ -1653,7 +1678,7 @@ public class Encounter extends DomainResource {
/**
* The referral request that this encounter satisfies (incoming referral).
*/
@Child(name = "incomingReferral", type = {ReferralRequest.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Child(name = "incomingReferral", type = {ReferralRequest.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="The Referral that initiated this encounter", formalDefinition="The referral request that this encounter satisfies (incoming referral)." )
protected List<Reference> incomingReferral;
/**
@ -1665,14 +1690,14 @@ public class Encounter extends DomainResource {
/**
* The list of people responsible for providing the service.
*/
@Child(name = "participant", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "participant", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="List of participants involved in the encounter", formalDefinition="The list of people responsible for providing the service." )
protected List<EncounterParticipantComponent> participant;
/**
* The appointment that scheduled this encounter.
*/
@Child(name = "appointment", type = {Appointment.class}, order=9, min=0, max=1, modifier=false, summary=true)
@Child(name = "appointment", type = {Appointment.class}, order=10, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The appointment that scheduled this encounter", formalDefinition="The appointment that scheduled this encounter." )
protected Reference appointment;
@ -1684,28 +1709,28 @@ public class Encounter extends DomainResource {
/**
* The start and end time of the encounter.
*/
@Child(name = "period", type = {Period.class}, order=10, min=0, max=1, modifier=false, summary=false)
@Child(name = "period", type = {Period.class}, order=11, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="The start and end time of the encounter", formalDefinition="The start and end time of the encounter." )
protected Period period;
/**
* Quantity of time the encounter lasted. This excludes the time during leaves of absence.
*/
@Child(name = "length", type = {Duration.class}, order=11, min=0, max=1, modifier=false, summary=false)
@Child(name = "length", type = {Duration.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Quantity of time the encounter lasted (less time absent)", formalDefinition="Quantity of time the encounter lasted. This excludes the time during leaves of absence." )
protected Duration length;
/**
* Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.
*/
@Child(name = "reason", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "reason", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Reason the encounter takes place (code)", formalDefinition="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." )
protected List<CodeableConcept> reason;
/**
* Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.
*/
@Child(name = "indication", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Child(name = "indication", type = {Condition.class, Procedure.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Reason the encounter takes place (resource)", formalDefinition="Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure." )
protected List<Reference> indication;
/**
@ -1715,24 +1740,17 @@ public class Encounter extends DomainResource {
/**
* Indicates the urgency of the encounter.
*/
@Child(name = "priority", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Indicates the urgency of the encounter", formalDefinition="Indicates the urgency of the encounter." )
protected CodeableConcept priority;
/**
* Details about an admission to a clinic.
* Details about the admission to a healthcare service.
*/
@Child(name = "hospitalization", type = {}, order=15, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Details about an admission to a clinic", formalDefinition="Details about an admission to a clinic." )
@Description(shortDefinition="Details about the admission to a healthcare service", formalDefinition="Details about the admission to a healthcare service." )
protected EncounterHospitalizationComponent hospitalization;
/**
* List of locations at which the patient has been.
* List of locations at which the patient has been during this encounter.
*/
@Child(name = "location", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="List of locations the patient has been at", formalDefinition="List of locations at which the patient has been." )
@Description(shortDefinition="List of locations the patient has been at", formalDefinition="List of locations at which the patient has been during this encounter." )
protected List<EncounterLocationComponent> location;
/**
@ -1759,7 +1777,7 @@ public class Encounter extends DomainResource {
*/
protected Encounter partOfTarget;
private static final long serialVersionUID = 117971528L;
private static final long serialVersionUID = 929562300L;
/*
* Constructor
@ -1990,6 +2008,30 @@ public class Encounter extends DomainResource {
return this;
}
/**
* @return {@link #priority} (Indicates the urgency of the encounter.)
*/
public CodeableConcept getPriority() {
if (this.priority == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Encounter.priority");
else if (Configuration.doAutoCreate())
this.priority = new CodeableConcept(); // cc
return this.priority;
}
public boolean hasPriority() {
return this.priority != null && !this.priority.isEmpty();
}
/**
* @param value {@link #priority} (Indicates the urgency of the encounter.)
*/
public Encounter setPriority(CodeableConcept value) {
this.priority = value;
return this;
}
/**
* @return {@link #patient} (The patient present at the encounter.)
*/
@ -2378,31 +2420,7 @@ public class Encounter extends DomainResource {
}
/**
* @return {@link #priority} (Indicates the urgency of the encounter.)
*/
public CodeableConcept getPriority() {
if (this.priority == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Encounter.priority");
else if (Configuration.doAutoCreate())
this.priority = new CodeableConcept(); // cc
return this.priority;
}
public boolean hasPriority() {
return this.priority != null && !this.priority.isEmpty();
}
/**
* @param value {@link #priority} (Indicates the urgency of the encounter.)
*/
public Encounter setPriority(CodeableConcept value) {
this.priority = value;
return this;
}
/**
* @return {@link #hospitalization} (Details about an admission to a clinic.)
* @return {@link #hospitalization} (Details about the admission to a healthcare service.)
*/
public EncounterHospitalizationComponent getHospitalization() {
if (this.hospitalization == null)
@ -2418,7 +2436,7 @@ public class Encounter extends DomainResource {
}
/**
* @param value {@link #hospitalization} (Details about an admission to a clinic.)
* @param value {@link #hospitalization} (Details about the admission to a healthcare service.)
*/
public Encounter setHospitalization(EncounterHospitalizationComponent value) {
this.hospitalization = value;
@ -2426,7 +2444,7 @@ public class Encounter extends DomainResource {
}
/**
* @return {@link #location} (List of locations at which the patient has been.)
* @return {@link #location} (List of locations at which the patient has been during this encounter.)
*/
public List<EncounterLocationComponent> getLocation() {
if (this.location == null)
@ -2444,7 +2462,7 @@ public class Encounter extends DomainResource {
}
/**
* @return {@link #location} (List of locations at which the patient has been.)
* @return {@link #location} (List of locations at which the patient has been during this encounter.)
*/
// syntactic sugar
public EncounterLocationComponent addLocation() { //3
@ -2560,6 +2578,7 @@ public class Encounter extends DomainResource {
childrenList.add(new Property("statusHistory", "", "The current status is always found in the current version of the resource. This status history permits the encounter resource to contain the status history without the needing to read through the historical versions of the resource, or even have the server store them.", 0, java.lang.Integer.MAX_VALUE, statusHistory));
childrenList.add(new Property("class", "code", "inpatient | outpatient | ambulatory | emergency +.", 0, java.lang.Integer.MAX_VALUE, class_));
childrenList.add(new Property("type", "CodeableConcept", "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("priority", "CodeableConcept", "Indicates the urgency of the encounter.", 0, java.lang.Integer.MAX_VALUE, priority));
childrenList.add(new Property("patient", "Reference(Patient)", "The patient present at the encounter.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("episodeOfCare", "Reference(EpisodeOfCare)", "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as govt reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).", 0, java.lang.Integer.MAX_VALUE, episodeOfCare));
childrenList.add(new Property("incomingReferral", "Reference(ReferralRequest)", "The referral request that this encounter satisfies (incoming referral).", 0, java.lang.Integer.MAX_VALUE, incomingReferral));
@ -2568,10 +2587,9 @@ public class Encounter extends DomainResource {
childrenList.add(new Property("period", "Period", "The start and end time of the encounter.", 0, java.lang.Integer.MAX_VALUE, period));
childrenList.add(new Property("length", "Duration", "Quantity of time the encounter lasted. This excludes the time during leaves of absence.", 0, java.lang.Integer.MAX_VALUE, length));
childrenList.add(new Property("reason", "CodeableConcept", "Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.", 0, java.lang.Integer.MAX_VALUE, reason));
childrenList.add(new Property("indication", "Reference(Any)", "Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, indication));
childrenList.add(new Property("priority", "CodeableConcept", "Indicates the urgency of the encounter.", 0, java.lang.Integer.MAX_VALUE, priority));
childrenList.add(new Property("hospitalization", "", "Details about an admission to a clinic.", 0, java.lang.Integer.MAX_VALUE, hospitalization));
childrenList.add(new Property("location", "", "List of locations at which the patient has been.", 0, java.lang.Integer.MAX_VALUE, location));
childrenList.add(new Property("indication", "Reference(Condition|Procedure)", "Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, indication));
childrenList.add(new Property("hospitalization", "", "Details about the admission to a healthcare service.", 0, java.lang.Integer.MAX_VALUE, hospitalization));
childrenList.add(new Property("location", "", "List of locations at which the patient has been during this encounter.", 0, java.lang.Integer.MAX_VALUE, location));
childrenList.add(new Property("serviceProvider", "Reference(Organization)", "An organization that is in charge of maintaining the information of this Encounter (e.g., who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", 0, java.lang.Integer.MAX_VALUE, serviceProvider));
childrenList.add(new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, java.lang.Integer.MAX_VALUE, partOf));
}
@ -2596,6 +2614,7 @@ public class Encounter extends DomainResource {
for (CodeableConcept i : type)
dst.type.add(i.copy());
};
dst.priority = priority == null ? null : priority.copy();
dst.patient = patient == null ? null : patient.copy();
if (episodeOfCare != null) {
dst.episodeOfCare = new ArrayList<Reference>();
@ -2625,7 +2644,6 @@ public class Encounter extends DomainResource {
for (Reference i : indication)
dst.indication.add(i.copy());
};
dst.priority = priority == null ? null : priority.copy();
dst.hospitalization = hospitalization == null ? null : hospitalization.copy();
if (location != null) {
dst.location = new ArrayList<EncounterLocationComponent>();
@ -2649,11 +2667,11 @@ public class Encounter extends DomainResource {
return false;
Encounter o = (Encounter) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusHistory, o.statusHistory, true)
&& compareDeep(class_, o.class_, true) && compareDeep(type, o.type, true) && compareDeep(patient, o.patient, true)
&& compareDeep(episodeOfCare, o.episodeOfCare, true) && compareDeep(incomingReferral, o.incomingReferral, true)
&& compareDeep(class_, o.class_, true) && compareDeep(type, o.type, true) && compareDeep(priority, o.priority, true)
&& compareDeep(patient, o.patient, true) && compareDeep(episodeOfCare, o.episodeOfCare, true) && compareDeep(incomingReferral, o.incomingReferral, true)
&& compareDeep(participant, o.participant, true) && compareDeep(appointment, o.appointment, true)
&& compareDeep(period, o.period, true) && compareDeep(length, o.length, true) && compareDeep(reason, o.reason, true)
&& compareDeep(indication, o.indication, true) && compareDeep(priority, o.priority, true) && compareDeep(hospitalization, o.hospitalization, true)
&& compareDeep(indication, o.indication, true) && compareDeep(hospitalization, o.hospitalization, true)
&& compareDeep(location, o.location, true) && compareDeep(serviceProvider, o.serviceProvider, true)
&& compareDeep(partOf, o.partOf, true);
}
@ -2671,11 +2689,11 @@ public class Encounter extends DomainResource {
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (statusHistory == null || statusHistory.isEmpty()) && (class_ == null || class_.isEmpty())
&& (type == null || type.isEmpty()) && (patient == null || patient.isEmpty()) && (episodeOfCare == null || episodeOfCare.isEmpty())
&& (incomingReferral == null || incomingReferral.isEmpty()) && (participant == null || participant.isEmpty())
&& (appointment == null || appointment.isEmpty()) && (period == null || period.isEmpty())
&& (length == null || length.isEmpty()) && (reason == null || reason.isEmpty()) && (indication == null || indication.isEmpty())
&& (priority == null || priority.isEmpty()) && (hospitalization == null || hospitalization.isEmpty())
&& (type == null || type.isEmpty()) && (priority == null || priority.isEmpty()) && (patient == null || patient.isEmpty())
&& (episodeOfCare == null || episodeOfCare.isEmpty()) && (incomingReferral == null || incomingReferral.isEmpty())
&& (participant == null || participant.isEmpty()) && (appointment == null || appointment.isEmpty())
&& (period == null || period.isEmpty()) && (length == null || length.isEmpty()) && (reason == null || reason.isEmpty())
&& (indication == null || indication.isEmpty()) && (hospitalization == null || hospitalization.isEmpty())
&& (location == null || location.isEmpty()) && (serviceProvider == null || serviceProvider.isEmpty())
&& (partOf == null || partOf.isEmpty());
}
@ -2705,10 +2723,14 @@ public class Encounter extends DomainResource {
public static final String SP_APPOINTMENT = "appointment";
@SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference" )
public static final String SP_PARTOF = "part-of";
@SearchParamDefinition(name="procedure", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" )
public static final String SP_PROCEDURE = "procedure";
@SearchParamDefinition(name="type", path="Encounter.type", description="Specific type of encounter", type="token" )
public static final String SP_TYPE = "type";
@SearchParamDefinition(name="participant", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference" )
public static final String SP_PARTICIPANT = "participant";
@SearchParamDefinition(name="condition", path="Encounter.indication", description="Reason the encounter takes place (resource)", type="reference" )
public static final String SP_CONDITION = "condition";
@SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="location-period", path="Encounter.location.period", description="Time period during which the patient was present at the location", type="date" )

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import org.hl7.fhir.instance.model.api.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -521,10 +521,10 @@ public class EpisodeOfCare extends DomainResource {
protected Enumeration<EpisodeOfCareStatus> status;
/**
* The status history for the EpisodeOfCare.
* The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).
*/
@Child(name = "statusHistory", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="The status history for the EpisodeOfCare", formalDefinition="The status history for the EpisodeOfCare." )
@Description(shortDefinition="The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource)", formalDefinition="The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource)." )
protected List<EpisodeOfCareStatusHistoryComponent> statusHistory;
/**
@ -534,10 +534,22 @@ public class EpisodeOfCare extends DomainResource {
@Description(shortDefinition="Specific type of EpisodeOfCare", formalDefinition="The type can be very important in processing as this could be used in determining if the EpisodeOfCare is relevant to specific government reporting, or other types of classifications." )
protected List<CodeableConcept> type;
/**
* A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.
*/
@Child(name = "condition", type = {Condition.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for", formalDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for." )
protected List<Reference> condition;
/**
* The actual objects that are the target of the reference (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
protected List<Condition> conditionTarget;
/**
* The patient that this EpisodeOfCare applies to.
*/
@Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=true)
@Child(name = "patient", type = {Patient.class}, order=5, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="The patient that this EpisodeOfCare applies to", formalDefinition="The patient that this EpisodeOfCare applies to." )
protected Reference patient;
@ -549,7 +561,7 @@ public class EpisodeOfCare extends DomainResource {
/**
* The organization that has assumed the specific responsibilities for the specified duration.
*/
@Child(name = "managingOrganization", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Child(name = "managingOrganization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The organization that has assumed the specific responsibilities for the specified duration", formalDefinition="The organization that has assumed the specific responsibilities for the specified duration." )
protected Reference managingOrganization;
@ -561,22 +573,10 @@ public class EpisodeOfCare extends DomainResource {
/**
* The interval during which the managing organization assumes the defined responsibility.
*/
@Child(name = "period", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Child(name = "period", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The interval during which the managing organization assumes the defined responsibility", formalDefinition="The interval during which the managing organization assumes the defined responsibility." )
protected Period period;
/**
* A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.
*/
@Child(name = "condition", type = {Condition.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for", formalDefinition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for." )
protected List<Reference> condition;
/**
* The actual objects that are the target of the reference (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
protected List<Condition> conditionTarget;
/**
* Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.
*/
@ -608,7 +608,7 @@ public class EpisodeOfCare extends DomainResource {
@Description(shortDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes", formalDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes." )
protected List<EpisodeOfCareCareTeamComponent> careTeam;
private static final long serialVersionUID = -1251791864L;
private static final long serialVersionUID = 1652653406L;
/*
* Constructor
@ -712,7 +712,7 @@ public class EpisodeOfCare extends DomainResource {
}
/**
* @return {@link #statusHistory} (The status history for the EpisodeOfCare.)
* @return {@link #statusHistory} (The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).)
*/
public List<EpisodeOfCareStatusHistoryComponent> getStatusHistory() {
if (this.statusHistory == null)
@ -730,7 +730,7 @@ public class EpisodeOfCare extends DomainResource {
}
/**
* @return {@link #statusHistory} (The status history for the EpisodeOfCare.)
* @return {@link #statusHistory} (The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).)
*/
// syntactic sugar
public EpisodeOfCareStatusHistoryComponent addStatusHistory() { //3
@ -791,6 +791,67 @@ public class EpisodeOfCare extends DomainResource {
return this;
}
/**
* @return {@link #condition} (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
public List<Reference> getCondition() {
if (this.condition == null)
this.condition = new ArrayList<Reference>();
return this.condition;
}
public boolean hasCondition() {
if (this.condition == null)
return false;
for (Reference item : this.condition)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #condition} (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
// syntactic sugar
public Reference addCondition() { //3
Reference t = new Reference();
if (this.condition == null)
this.condition = new ArrayList<Reference>();
this.condition.add(t);
return t;
}
// syntactic sugar
public EpisodeOfCare addCondition(Reference t) { //3
if (t == null)
return this;
if (this.condition == null)
this.condition = new ArrayList<Reference>();
this.condition.add(t);
return this;
}
/**
* @return {@link #condition} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
public List<Condition> getConditionTarget() {
if (this.conditionTarget == null)
this.conditionTarget = new ArrayList<Condition>();
return this.conditionTarget;
}
// syntactic sugar
/**
* @return {@link #condition} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
public Condition addConditionTarget() {
Condition r = new Condition();
if (this.conditionTarget == null)
this.conditionTarget = new ArrayList<Condition>();
this.conditionTarget.add(r);
return r;
}
/**
* @return {@link #patient} (The patient that this EpisodeOfCare applies to.)
*/
@ -903,67 +964,6 @@ public class EpisodeOfCare extends DomainResource {
return this;
}
/**
* @return {@link #condition} (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
public List<Reference> getCondition() {
if (this.condition == null)
this.condition = new ArrayList<Reference>();
return this.condition;
}
public boolean hasCondition() {
if (this.condition == null)
return false;
for (Reference item : this.condition)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #condition} (A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
// syntactic sugar
public Reference addCondition() { //3
Reference t = new Reference();
if (this.condition == null)
this.condition = new ArrayList<Reference>();
this.condition.add(t);
return t;
}
// syntactic sugar
public EpisodeOfCare addCondition(Reference t) { //3
if (t == null)
return this;
if (this.condition == null)
this.condition = new ArrayList<Reference>();
this.condition.add(t);
return this;
}
/**
* @return {@link #condition} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
public List<Condition> getConditionTarget() {
if (this.conditionTarget == null)
this.conditionTarget = new ArrayList<Condition>();
return this.conditionTarget;
}
// syntactic sugar
/**
* @return {@link #condition} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.)
*/
public Condition addConditionTarget() {
Condition r = new Condition();
if (this.conditionTarget == null)
this.conditionTarget = new ArrayList<Condition>();
this.conditionTarget.add(r);
return r;
}
/**
* @return {@link #referralRequest} (Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.)
*/
@ -1113,12 +1113,12 @@ public class EpisodeOfCare extends DomainResource {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "Identifier(s) by which this EpisodeOfCare is known.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("statusHistory", "", "The status history for the EpisodeOfCare.", 0, java.lang.Integer.MAX_VALUE, statusHistory));
childrenList.add(new Property("statusHistory", "", "The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).", 0, java.lang.Integer.MAX_VALUE, statusHistory));
childrenList.add(new Property("type", "CodeableConcept", "The type can be very important in processing as this could be used in determining if the EpisodeOfCare is relevant to specific government reporting, or other types of classifications.", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("condition", "Reference(Condition)", "A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.", 0, java.lang.Integer.MAX_VALUE, condition));
childrenList.add(new Property("patient", "Reference(Patient)", "The patient that this EpisodeOfCare applies to.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization that has assumed the specific responsibilities for the specified duration.", 0, java.lang.Integer.MAX_VALUE, managingOrganization));
childrenList.add(new Property("period", "Period", "The interval during which the managing organization assumes the defined responsibility.", 0, java.lang.Integer.MAX_VALUE, period));
childrenList.add(new Property("condition", "Reference(Condition)", "A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.", 0, java.lang.Integer.MAX_VALUE, condition));
childrenList.add(new Property("referralRequest", "Reference(ReferralRequest)", "Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.", 0, java.lang.Integer.MAX_VALUE, referralRequest));
childrenList.add(new Property("careManager", "Reference(Practitioner)", "The practitioner that is the care manager/care co-ordinator for this patient.", 0, java.lang.Integer.MAX_VALUE, careManager));
childrenList.add(new Property("careTeam", "", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, careTeam));
@ -1143,14 +1143,14 @@ public class EpisodeOfCare extends DomainResource {
for (CodeableConcept i : type)
dst.type.add(i.copy());
};
dst.patient = patient == null ? null : patient.copy();
dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy();
dst.period = period == null ? null : period.copy();
if (condition != null) {
dst.condition = new ArrayList<Reference>();
for (Reference i : condition)
dst.condition.add(i.copy());
};
dst.patient = patient == null ? null : patient.copy();
dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy();
dst.period = period == null ? null : period.copy();
if (referralRequest != null) {
dst.referralRequest = new ArrayList<Reference>();
for (Reference i : referralRequest)
@ -1177,9 +1177,10 @@ public class EpisodeOfCare extends DomainResource {
return false;
EpisodeOfCare o = (EpisodeOfCare) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusHistory, o.statusHistory, true)
&& compareDeep(type, o.type, true) && compareDeep(patient, o.patient, true) && compareDeep(managingOrganization, o.managingOrganization, true)
&& compareDeep(period, o.period, true) && compareDeep(condition, o.condition, true) && compareDeep(referralRequest, o.referralRequest, true)
&& compareDeep(careManager, o.careManager, true) && compareDeep(careTeam, o.careTeam, true);
&& compareDeep(type, o.type, true) && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true)
&& compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(period, o.period, true)
&& compareDeep(referralRequest, o.referralRequest, true) && compareDeep(careManager, o.careManager, true)
&& compareDeep(careTeam, o.careTeam, true);
}
@Override
@ -1195,8 +1196,8 @@ public class EpisodeOfCare extends DomainResource {
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (statusHistory == null || statusHistory.isEmpty()) && (type == null || type.isEmpty())
&& (patient == null || patient.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty())
&& (period == null || period.isEmpty()) && (condition == null || condition.isEmpty()) && (referralRequest == null || referralRequest.isEmpty())
&& (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty())
&& (period == null || period.isEmpty()) && (referralRequest == null || referralRequest.isEmpty())
&& (careManager == null || careManager.isEmpty()) && (careTeam == null || careTeam.isEmpty())
;
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -47,14 +47,114 @@ import org.hl7.fhir.instance.model.api.*;
@ResourceDef(name="FamilyMemberHistory", profile="http://hl7.org/fhir/Profile/FamilyMemberHistory")
public class FamilyMemberHistory extends DomainResource {
public enum FamilyHistoryStatus {
/**
* Some health information is known and captured, but not complete - see notes for details
*/
PARTIAL,
/**
* All relevant health information is known and captured
*/
COMPLETED,
/**
* This instance should not have been part of this patient's medical record
*/
ENTEREDINERROR,
/**
* Health information for this individual is unavailable/unknown
*/
HEALTHUNKNOWN,
/**
* added to help the parsers
*/
NULL;
public static FamilyHistoryStatus fromCode(String codeString) throws Exception {
if (codeString == null || "".equals(codeString))
return null;
if ("partial".equals(codeString))
return PARTIAL;
if ("completed".equals(codeString))
return COMPLETED;
if ("entered-in-error".equals(codeString))
return ENTEREDINERROR;
if ("health-unknown".equals(codeString))
return HEALTHUNKNOWN;
throw new Exception("Unknown FamilyHistoryStatus code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case PARTIAL: return "partial";
case COMPLETED: return "completed";
case ENTEREDINERROR: return "entered-in-error";
case HEALTHUNKNOWN: return "health-unknown";
default: return "?";
}
}
public String getSystem() {
switch (this) {
case PARTIAL: return "http://hl7.org/fhir/history-status";
case COMPLETED: return "http://hl7.org/fhir/history-status";
case ENTEREDINERROR: return "http://hl7.org/fhir/history-status";
case HEALTHUNKNOWN: return "http://hl7.org/fhir/history-status";
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case PARTIAL: return "Some health information is known and captured, but not complete - see notes for details";
case COMPLETED: return "All relevant health information is known and captured";
case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record";
case HEALTHUNKNOWN: return "Health information for this individual is unavailable/unknown";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case PARTIAL: return "Partial";
case COMPLETED: return "Completed";
case ENTEREDINERROR: return "Entered in error";
case HEALTHUNKNOWN: return "Health unknown";
default: return "?";
}
}
}
public static class FamilyHistoryStatusEnumFactory implements EnumFactory<FamilyHistoryStatus> {
public FamilyHistoryStatus fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("partial".equals(codeString))
return FamilyHistoryStatus.PARTIAL;
if ("completed".equals(codeString))
return FamilyHistoryStatus.COMPLETED;
if ("entered-in-error".equals(codeString))
return FamilyHistoryStatus.ENTEREDINERROR;
if ("health-unknown".equals(codeString))
return FamilyHistoryStatus.HEALTHUNKNOWN;
throw new IllegalArgumentException("Unknown FamilyHistoryStatus code '"+codeString+"'");
}
public String toCode(FamilyHistoryStatus code) {
if (code == FamilyHistoryStatus.PARTIAL)
return "partial";
if (code == FamilyHistoryStatus.COMPLETED)
return "completed";
if (code == FamilyHistoryStatus.ENTEREDINERROR)
return "entered-in-error";
if (code == FamilyHistoryStatus.HEALTHUNKNOWN)
return "health-unknown";
return "?";
}
}
@Block()
public static class FamilyMemberHistoryConditionComponent extends BackboneElement implements IBaseBackboneElement {
/**
* The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Condition suffered by relation", formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system." )
protected CodeableConcept type;
protected CodeableConcept code;
/**
* Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.
@ -66,18 +166,18 @@ public class FamilyMemberHistory extends DomainResource {
/**
* Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.
*/
@Child(name = "onset", type = {Age.class, Range.class, StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Child(name = "onset", type = {Age.class, Range.class, Period.class, StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When condition first manifested", formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence." )
protected Type onset;
/**
* An area where general notes can be placed about this specific condition.
*/
@Child(name = "note", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Child(name = "note", type = {Annotation.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Extra information about condition", formalDefinition="An area where general notes can be placed about this specific condition." )
protected StringType note;
protected Annotation note;
private static final long serialVersionUID = -1664709272L;
private static final long serialVersionUID = -1221569121L;
/*
* Constructor
@ -89,32 +189,32 @@ public class FamilyMemberHistory extends DomainResource {
/*
* Constructor
*/
public FamilyMemberHistoryConditionComponent(CodeableConcept type) {
public FamilyMemberHistoryConditionComponent(CodeableConcept code) {
super();
this.type = type;
this.code = code;
}
/**
* @return {@link #type} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.)
* @return {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.)
*/
public CodeableConcept getType() {
if (this.type == null)
public CodeableConcept getCode() {
if (this.code == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.type");
throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.code");
else if (Configuration.doAutoCreate())
this.type = new CodeableConcept(); // cc
return this.type;
this.code = new CodeableConcept(); // cc
return this.code;
}
public boolean hasType() {
return this.type != null && !this.type.isEmpty();
public boolean hasCode() {
return this.code != null && !this.code.isEmpty();
}
/**
* @param value {@link #type} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.)
* @param value {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.)
*/
public FamilyMemberHistoryConditionComponent setType(CodeableConcept value) {
this.type = value;
public FamilyMemberHistoryConditionComponent setCode(CodeableConcept value) {
this.code = value;
return this;
}
@ -175,6 +275,19 @@ public class FamilyMemberHistory extends DomainResource {
return this.onset instanceof Range;
}
/**
* @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.)
*/
public Period getOnsetPeriod() throws Exception {
if (!(this.onset instanceof Period))
throw new Exception("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered");
return (Period) this.onset;
}
public boolean hasOnsetPeriod() throws Exception {
return this.onset instanceof Period;
}
/**
* @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.)
*/
@ -201,66 +314,41 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @return {@link #note} (An area where general notes can be placed about this specific condition.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
* @return {@link #note} (An area where general notes can be placed about this specific condition.)
*/
public StringType getNoteElement() {
public Annotation getNote() {
if (this.note == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.note");
else if (Configuration.doAutoCreate())
this.note = new StringType(); // bb
this.note = new Annotation(); // cc
return this.note;
}
public boolean hasNoteElement() {
return this.note != null && !this.note.isEmpty();
}
public boolean hasNote() {
return this.note != null && !this.note.isEmpty();
}
/**
* @param value {@link #note} (An area where general notes can be placed about this specific condition.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
* @param value {@link #note} (An area where general notes can be placed about this specific condition.)
*/
public FamilyMemberHistoryConditionComponent setNoteElement(StringType value) {
public FamilyMemberHistoryConditionComponent setNote(Annotation value) {
this.note = value;
return this;
}
/**
* @return An area where general notes can be placed about this specific condition.
*/
public String getNote() {
return this.note == null ? null : this.note.getValue();
}
/**
* @param value An area where general notes can be placed about this specific condition.
*/
public FamilyMemberHistoryConditionComponent setNote(String value) {
if (Utilities.noString(value))
this.note = null;
else {
if (this.note == null)
this.note = new StringType();
this.note.setValue(value);
}
return this;
}
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("type", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, java.lang.Integer.MAX_VALUE, type));
childrenList.add(new Property("code", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, java.lang.Integer.MAX_VALUE, code));
childrenList.add(new Property("outcome", "CodeableConcept", "Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.", 0, java.lang.Integer.MAX_VALUE, outcome));
childrenList.add(new Property("onset[x]", "Age|Range|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, java.lang.Integer.MAX_VALUE, onset));
childrenList.add(new Property("note", "string", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note));
childrenList.add(new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, java.lang.Integer.MAX_VALUE, onset));
childrenList.add(new Property("note", "Annotation", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note));
}
public FamilyMemberHistoryConditionComponent copy() {
FamilyMemberHistoryConditionComponent dst = new FamilyMemberHistoryConditionComponent();
copyValues(dst);
dst.type = type == null ? null : type.copy();
dst.code = code == null ? null : code.copy();
dst.outcome = outcome == null ? null : outcome.copy();
dst.onset = onset == null ? null : onset.copy();
dst.note = note == null ? null : note.copy();
@ -274,7 +362,7 @@ public class FamilyMemberHistory extends DomainResource {
if (!(other instanceof FamilyMemberHistoryConditionComponent))
return false;
FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other;
return compareDeep(type, o.type, true) && compareDeep(outcome, o.outcome, true) && compareDeep(onset, o.onset, true)
return compareDeep(code, o.code, true) && compareDeep(outcome, o.outcome, true) && compareDeep(onset, o.onset, true)
&& compareDeep(note, o.note, true);
}
@ -285,11 +373,11 @@ public class FamilyMemberHistory extends DomainResource {
if (!(other instanceof FamilyMemberHistoryConditionComponent))
return false;
FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other;
return compareValues(note, o.note, true);
return true;
}
public boolean isEmpty() {
return super.isEmpty() && (type == null || type.isEmpty()) && (outcome == null || outcome.isEmpty())
return super.isEmpty() && (code == null || code.isEmpty()) && (outcome == null || outcome.isEmpty())
&& (onset == null || onset.isEmpty()) && (note == null || note.isEmpty());
}
@ -321,63 +409,70 @@ public class FamilyMemberHistory extends DomainResource {
@Description(shortDefinition="When history was captured/updated", formalDefinition="The date (and possibly time) when the family member history was taken." )
protected DateTimeType date;
/**
* A code specifying a state of a Family Member History record.
*/
@Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true)
@Description(shortDefinition="partial | completed | entered-in-error | health-unknown", formalDefinition="A code specifying a state of a Family Member History record." )
protected Enumeration<FamilyHistoryStatus> status;
/**
* This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair".
*/
@Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The family member described", formalDefinition="This will either be a name or a description. E.g. \"Aunt Susan\", \"my cousin with the red hair\"." )
protected StringType name;
/**
* The type of relationship this person has to the patient (father, mother, brother etc.).
*/
@Child(name = "relationship", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true)
@Child(name = "relationship", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Relationship to the subject", formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)." )
protected CodeableConcept relationship;
/**
* Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.
*/
@Child(name = "gender", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Child(name = "gender", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes." )
protected Enumeration<AdministrativeGender> gender;
/**
* The actual or approximate date of birth of the relative.
*/
@Child(name = "born", type = {Period.class, DateType.class, StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
@Child(name = "born", type = {Period.class, DateType.class, StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="(approximate) date of birth", formalDefinition="The actual or approximate date of birth of the relative." )
protected Type born;
/**
* The actual or approximate age of the relative at the time the family member history is recorded.
*/
@Child(name = "age", type = {Age.class, Range.class, StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Child(name = "age", type = {Age.class, Range.class, StringType.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="(approximate) age", formalDefinition="The actual or approximate age of the relative at the time the family member history is recorded." )
protected Type age;
/**
* The actual or approximate age of the relative at the time the family member history is recorded.
* Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.
*/
@Child(name = "deceased", type = {BooleanType.class, Age.class, Range.class, DateType.class, StringType.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Dead? How old/when?", formalDefinition="The actual or approximate age of the relative at the time the family member history is recorded." )
@Child(name = "deceased", type = {BooleanType.class, Age.class, Range.class, DateType.class, StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Dead? How old/when?", formalDefinition="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record." )
protected Type deceased;
/**
* This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
*/
@Child(name = "note", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Child(name = "note", type = {Annotation.class}, order=10, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="General note about related person", formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible." )
protected StringType note;
protected Annotation note;
/**
* The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
*/
@Child(name = "condition", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Child(name = "condition", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Condition that the related person had", formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition." )
protected List<FamilyMemberHistoryConditionComponent> condition;
private static final long serialVersionUID = 1785160836L;
private static final long serialVersionUID = -1799103041L;
/*
* Constructor
@ -389,9 +484,10 @@ public class FamilyMemberHistory extends DomainResource {
/*
* Constructor
*/
public FamilyMemberHistory(Reference patient, CodeableConcept relationship) {
public FamilyMemberHistory(Reference patient, Enumeration<FamilyHistoryStatus> status, CodeableConcept relationship) {
super();
this.patient = patient;
this.status = status;
this.relationship = relationship;
}
@ -528,6 +624,51 @@ public class FamilyMemberHistory extends DomainResource {
return this;
}
/**
* @return {@link #status} (A code specifying a state of a Family Member History record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public Enumeration<FamilyHistoryStatus> getStatusElement() {
if (this.status == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create FamilyMemberHistory.status");
else if (Configuration.doAutoCreate())
this.status = new Enumeration<FamilyHistoryStatus>(new FamilyHistoryStatusEnumFactory()); // bb
return this.status;
}
public boolean hasStatusElement() {
return this.status != null && !this.status.isEmpty();
}
public boolean hasStatus() {
return this.status != null && !this.status.isEmpty();
}
/**
* @param value {@link #status} (A code specifying a state of a Family Member History record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public FamilyMemberHistory setStatusElement(Enumeration<FamilyHistoryStatus> value) {
this.status = value;
return this;
}
/**
* @return A code specifying a state of a Family Member History record.
*/
public FamilyHistoryStatus getStatus() {
return this.status == null ? null : this.status.getValue();
}
/**
* @param value A code specifying a state of a Family Member History record.
*/
public FamilyMemberHistory setStatus(FamilyHistoryStatus value) {
if (this.status == null)
this.status = new Enumeration<FamilyHistoryStatus>(new FamilyHistoryStatusEnumFactory());
this.status.setValue(value);
return this;
}
/**
* @return {@link #name} (This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
*/
@ -767,14 +908,14 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.)
* @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
*/
public Type getDeceased() {
return this.deceased;
}
/**
* @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.)
* @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
*/
public BooleanType getDeceasedBooleanType() throws Exception {
if (!(this.deceased instanceof BooleanType))
@ -787,7 +928,7 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.)
* @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
*/
public Age getDeceasedAge() throws Exception {
if (!(this.deceased instanceof Age))
@ -800,7 +941,7 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.)
* @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
*/
public Range getDeceasedRange() throws Exception {
if (!(this.deceased instanceof Range))
@ -813,7 +954,7 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.)
* @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
*/
public DateType getDeceasedDateType() throws Exception {
if (!(this.deceased instanceof DateType))
@ -826,7 +967,7 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.)
* @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
*/
public StringType getDeceasedStringType() throws Exception {
if (!(this.deceased instanceof StringType))
@ -843,7 +984,7 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @param value {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.)
* @param value {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
*/
public FamilyMemberHistory setDeceased(Type value) {
this.deceased = value;
@ -851,54 +992,29 @@ public class FamilyMemberHistory extends DomainResource {
}
/**
* @return {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
* @return {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.)
*/
public StringType getNoteElement() {
public Annotation getNote() {
if (this.note == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create FamilyMemberHistory.note");
else if (Configuration.doAutoCreate())
this.note = new StringType(); // bb
this.note = new Annotation(); // cc
return this.note;
}
public boolean hasNoteElement() {
return this.note != null && !this.note.isEmpty();
}
public boolean hasNote() {
return this.note != null && !this.note.isEmpty();
}
/**
* @param value {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
* @param value {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.)
*/
public FamilyMemberHistory setNoteElement(StringType value) {
public FamilyMemberHistory setNote(Annotation value) {
this.note = value;
return this;
}
/**
* @return This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
*/
public String getNote() {
return this.note == null ? null : this.note.getValue();
}
/**
* @param value This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
*/
public FamilyMemberHistory setNote(String value) {
if (Utilities.noString(value))
this.note = null;
else {
if (this.note == null)
this.note = new StringType();
this.note.setValue(value);
}
return this;
}
/**
* @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.)
*/
@ -944,13 +1060,14 @@ public class FamilyMemberHistory extends DomainResource {
childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("date", "dateTime", "The date (and possibly time) when the family member history was taken.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("status", "code", "A code specifying a state of a Family Member History record.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("name", "string", "This will either be a name or a description. E.g. \"Aunt Susan\", \"my cousin with the red hair\".", 0, java.lang.Integer.MAX_VALUE, name));
childrenList.add(new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, java.lang.Integer.MAX_VALUE, relationship));
childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender));
childrenList.add(new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, java.lang.Integer.MAX_VALUE, born));
childrenList.add(new Property("age[x]", "Age|Range|string", "The actual or approximate age of the relative at the time the family member history is recorded.", 0, java.lang.Integer.MAX_VALUE, age));
childrenList.add(new Property("deceased[x]", "boolean|Age|Range|date|string", "The actual or approximate age of the relative at the time the family member history is recorded.", 0, java.lang.Integer.MAX_VALUE, deceased));
childrenList.add(new Property("note", "string", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note));
childrenList.add(new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, java.lang.Integer.MAX_VALUE, deceased));
childrenList.add(new Property("note", "Annotation", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note));
childrenList.add(new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition));
}
@ -964,6 +1081,7 @@ public class FamilyMemberHistory extends DomainResource {
};
dst.patient = patient == null ? null : patient.copy();
dst.date = date == null ? null : date.copy();
dst.status = status == null ? null : status.copy();
dst.name = name == null ? null : name.copy();
dst.relationship = relationship == null ? null : relationship.copy();
dst.gender = gender == null ? null : gender.copy();
@ -991,9 +1109,10 @@ public class FamilyMemberHistory extends DomainResource {
return false;
FamilyMemberHistory o = (FamilyMemberHistory) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(date, o.date, true)
&& compareDeep(name, o.name, true) && compareDeep(relationship, o.relationship, true) && compareDeep(gender, o.gender, true)
&& compareDeep(born, o.born, true) && compareDeep(age, o.age, true) && compareDeep(deceased, o.deceased, true)
&& compareDeep(note, o.note, true) && compareDeep(condition, o.condition, true);
&& compareDeep(status, o.status, true) && compareDeep(name, o.name, true) && compareDeep(relationship, o.relationship, true)
&& compareDeep(gender, o.gender, true) && compareDeep(born, o.born, true) && compareDeep(age, o.age, true)
&& compareDeep(deceased, o.deceased, true) && compareDeep(note, o.note, true) && compareDeep(condition, o.condition, true)
;
}
@Override
@ -1003,16 +1122,16 @@ public class FamilyMemberHistory extends DomainResource {
if (!(other instanceof FamilyMemberHistory))
return false;
FamilyMemberHistory o = (FamilyMemberHistory) other;
return compareValues(date, o.date, true) && compareValues(name, o.name, true) && compareValues(gender, o.gender, true)
&& compareValues(note, o.note, true);
return compareValues(date, o.date, true) && compareValues(status, o.status, true) && compareValues(name, o.name, true)
&& compareValues(gender, o.gender, true);
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty())
&& (date == null || date.isEmpty()) && (name == null || name.isEmpty()) && (relationship == null || relationship.isEmpty())
&& (gender == null || gender.isEmpty()) && (born == null || born.isEmpty()) && (age == null || age.isEmpty())
&& (deceased == null || deceased.isEmpty()) && (note == null || note.isEmpty()) && (condition == null || condition.isEmpty())
;
&& (date == null || date.isEmpty()) && (status == null || status.isEmpty()) && (name == null || name.isEmpty())
&& (relationship == null || relationship.isEmpty()) && (gender == null || gender.isEmpty())
&& (born == null || born.isEmpty()) && (age == null || age.isEmpty()) && (deceased == null || deceased.isEmpty())
&& (note == null || note.isEmpty()) && (condition == null || condition.isEmpty());
}
@Override
@ -1022,8 +1141,16 @@ public class FamilyMemberHistory extends DomainResource {
@SearchParamDefinition(name="date", path="FamilyMemberHistory.date", description="When history was captured/updated", type="date" )
public static final String SP_DATE = "date";
@SearchParamDefinition(name="identifier", path="FamilyMemberHistory.identifier", description="A search by a record identifier", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="code", path="FamilyMemberHistory.condition.code", description="A search by a condition code", type="token" )
public static final String SP_CODE = "code";
@SearchParamDefinition(name="gender", path="FamilyMemberHistory.gender", description="A search by a gender code of a family member", type="token" )
public static final String SP_GENDER = "gender";
@SearchParamDefinition(name="patient", path="FamilyMemberHistory.patient", description="The identity of a subject to list family member history items for", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="relationship", path="FamilyMemberHistory.relationship", description="A search by a relationship type", type="token" )
public static final String SP_RELATIONSHIP = "relationship";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -140,10 +140,10 @@ public class Flag extends DomainResource {
protected List<Identifier> identifier;
/**
* Allows an flag to be divided into different categories like clinical, administrative etc.
* Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an flag to be divided into different categories like clinical, administrative etc." )
@Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context." )
protected CodeableConcept category;
/**
@ -185,14 +185,14 @@ public class Flag extends DomainResource {
protected Encounter encounterTarget;
/**
* The person or device that created the flag.
* The person, organization or device that created the flag.
*/
@Child(name = "author", type = {Practitioner.class, Patient.class, Device.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Flag creator", formalDefinition="The person or device that created the flag." )
@Child(name = "author", type = {Device.class, Organization.class, Patient.class, Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Flag creator", formalDefinition="The person, organization or device that created the flag." )
protected Reference author;
/**
* The actual object that is the target of the reference (The person or device that created the flag.)
* The actual object that is the target of the reference (The person, organization or device that created the flag.)
*/
protected Resource authorTarget;
@ -263,7 +263,7 @@ public class Flag extends DomainResource {
}
/**
* @return {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc.)
* @return {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.)
*/
public CodeableConcept getCategory() {
if (this.category == null)
@ -279,7 +279,7 @@ public class Flag extends DomainResource {
}
/**
* @param value {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc.)
* @param value {@link #category} (Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.)
*/
public Flag setCategory(CodeableConcept value) {
this.category = value;
@ -439,7 +439,7 @@ public class Flag extends DomainResource {
}
/**
* @return {@link #author} (The person or device that created the flag.)
* @return {@link #author} (The person, organization or device that created the flag.)
*/
public Reference getAuthor() {
if (this.author == null)
@ -455,7 +455,7 @@ public class Flag extends DomainResource {
}
/**
* @param value {@link #author} (The person or device that created the flag.)
* @param value {@link #author} (The person, organization or device that created the flag.)
*/
public Flag setAuthor(Reference value) {
this.author = value;
@ -463,14 +463,14 @@ public class Flag extends DomainResource {
}
/**
* @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or device that created the flag.)
* @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person, organization or device that created the flag.)
*/
public Resource getAuthorTarget() {
return this.authorTarget;
}
/**
* @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or device that created the flag.)
* @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person, organization or device that created the flag.)
*/
public Flag setAuthorTarget(Resource value) {
this.authorTarget = value;
@ -504,12 +504,12 @@ public class Flag extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "Identifier assigned to the flag for external use (outside the FHIR environment).", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("category", "CodeableConcept", "Allows an flag to be divided into different categories like clinical, administrative etc.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("category", "CodeableConcept", "Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("status", "code", "Supports basic workflow.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("period", "Period", "The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.", 0, java.lang.Integer.MAX_VALUE, period));
childrenList.add(new Property("subject", "Reference(Patient|Location|Group|Organization|Practitioner)", "The patient, location, group , organization , or practitioner this is about record this flag is associated with.", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("encounter", "Reference(Encounter)", "This alert is only relevant during the encounter.", 0, java.lang.Integer.MAX_VALUE, encounter));
childrenList.add(new Property("author", "Reference(Practitioner|Patient|Device)", "The person or device that created the flag.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("author", "Reference(Device|Organization|Patient|Practitioner)", "The person, organization or device that created the flag.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("code", "CodeableConcept", "The coded value or textual component of the flag to display to the user.", 0, java.lang.Integer.MAX_VALUE, code));
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.Description;
import org.hl7.fhir.instance.model.annotations.Block;
import org.hl7.fhir.instance.model.api.*;
/**
* Describes the intended objective(s) of patient care, for example, weight loss, restoring an activity of daily living, etc.
* Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.;.
*/
@ResourceDef(name="Goal", profile="http://hl7.org/fhir/Profile/Goal")
public class Goal extends DomainResource {
@ -55,6 +55,14 @@ public class Goal extends DomainResource {
* A goal is planned for this patient
*/
PLANNED,
/**
* A proposed goal was accepted
*/
ACCEPTED,
/**
* A proposed goal was rejected
*/
REJECTED,
/**
* The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again)
*/
@ -67,18 +75,14 @@ public class Goal extends DomainResource {
* The goal has been met, but ongoing activity is needed to sustain the goal objective
*/
SUSTAINING,
/**
* The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.
*/
ONHOLD,
/**
* The goal is no longer being sought
*/
CANCELLED,
/**
* A proposed goal was accepted
*/
ACCEPTED,
/**
* A proposed goal was rejected
*/
REJECTED,
/**
* added to help the parsers
*/
@ -90,30 +94,33 @@ public class Goal extends DomainResource {
return PROPOSED;
if ("planned".equals(codeString))
return PLANNED;
if ("accepted".equals(codeString))
return ACCEPTED;
if ("rejected".equals(codeString))
return REJECTED;
if ("in-progress".equals(codeString))
return INPROGRESS;
if ("achieved".equals(codeString))
return ACHIEVED;
if ("sustaining".equals(codeString))
return SUSTAINING;
if ("on-hold".equals(codeString))
return ONHOLD;
if ("cancelled".equals(codeString))
return CANCELLED;
if ("accepted".equals(codeString))
return ACCEPTED;
if ("rejected".equals(codeString))
return REJECTED;
throw new Exception("Unknown GoalStatus code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case PROPOSED: return "proposed";
case PLANNED: return "planned";
case ACCEPTED: return "accepted";
case REJECTED: return "rejected";
case INPROGRESS: return "in-progress";
case ACHIEVED: return "achieved";
case SUSTAINING: return "sustaining";
case ONHOLD: return "on-hold";
case CANCELLED: return "cancelled";
case ACCEPTED: return "accepted";
case REJECTED: return "rejected";
default: return "?";
}
}
@ -121,12 +128,13 @@ public class Goal extends DomainResource {
switch (this) {
case PROPOSED: return "http://hl7.org/fhir/goal-status";
case PLANNED: return "http://hl7.org/fhir/goal-status";
case ACCEPTED: return "http://hl7.org/fhir/goal-status";
case REJECTED: return "http://hl7.org/fhir/goal-status";
case INPROGRESS: return "http://hl7.org/fhir/goal-status";
case ACHIEVED: return "http://hl7.org/fhir/goal-status";
case SUSTAINING: return "http://hl7.org/fhir/goal-status";
case ONHOLD: return "http://hl7.org/fhir/goal-status";
case CANCELLED: return "http://hl7.org/fhir/goal-status";
case ACCEPTED: return "http://hl7.org/fhir/goal-status";
case REJECTED: return "http://hl7.org/fhir/goal-status";
default: return "?";
}
}
@ -134,12 +142,13 @@ public class Goal extends DomainResource {
switch (this) {
case PROPOSED: return "A goal is proposed for this patient";
case PLANNED: return "A goal is planned for this patient";
case ACCEPTED: return "A proposed goal was accepted";
case REJECTED: return "A proposed goal was rejected";
case INPROGRESS: return "The goal is being sought but has not yet been reached. (Also applies if goal was reached in the past but there has been regression and goal is being sought again)";
case ACHIEVED: return "The goal has been met and no further action is needed";
case SUSTAINING: return "The goal has been met, but ongoing activity is needed to sustain the goal objective";
case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.";
case CANCELLED: return "The goal is no longer being sought";
case ACCEPTED: return "A proposed goal was accepted";
case REJECTED: return "A proposed goal was rejected";
default: return "?";
}
}
@ -147,12 +156,13 @@ public class Goal extends DomainResource {
switch (this) {
case PROPOSED: return "Proposed";
case PLANNED: return "Planned";
case ACCEPTED: return "Accepted";
case REJECTED: return "Rejected";
case INPROGRESS: return "In Progress";
case ACHIEVED: return "Achieved";
case SUSTAINING: return "Sustaining";
case ONHOLD: return "On Hold";
case CANCELLED: return "Cancelled";
case ACCEPTED: return "Accepted";
case REJECTED: return "Rejected";
default: return "?";
}
}
@ -167,18 +177,20 @@ public class Goal extends DomainResource {
return GoalStatus.PROPOSED;
if ("planned".equals(codeString))
return GoalStatus.PLANNED;
if ("accepted".equals(codeString))
return GoalStatus.ACCEPTED;
if ("rejected".equals(codeString))
return GoalStatus.REJECTED;
if ("in-progress".equals(codeString))
return GoalStatus.INPROGRESS;
if ("achieved".equals(codeString))
return GoalStatus.ACHIEVED;
if ("sustaining".equals(codeString))
return GoalStatus.SUSTAINING;
if ("on-hold".equals(codeString))
return GoalStatus.ONHOLD;
if ("cancelled".equals(codeString))
return GoalStatus.CANCELLED;
if ("accepted".equals(codeString))
return GoalStatus.ACCEPTED;
if ("rejected".equals(codeString))
return GoalStatus.REJECTED;
throw new IllegalArgumentException("Unknown GoalStatus code '"+codeString+"'");
}
public String toCode(GoalStatus code) {
@ -186,18 +198,20 @@ public class Goal extends DomainResource {
return "proposed";
if (code == GoalStatus.PLANNED)
return "planned";
if (code == GoalStatus.ACCEPTED)
return "accepted";
if (code == GoalStatus.REJECTED)
return "rejected";
if (code == GoalStatus.INPROGRESS)
return "in-progress";
if (code == GoalStatus.ACHIEVED)
return "achieved";
if (code == GoalStatus.SUSTAINING)
return "sustaining";
if (code == GoalStatus.ONHOLD)
return "on-hold";
if (code == GoalStatus.CANCELLED)
return "cancelled";
if (code == GoalStatus.ACCEPTED)
return "accepted";
if (code == GoalStatus.REJECTED)
return "rejected";
return "?";
}
}
@ -208,7 +222,7 @@ public class Goal extends DomainResource {
* Details of what's changed (or not changed).
*/
@Child(name = "result", type = {CodeableConcept.class, Observation.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Code or observation that resulted from gual", formalDefinition="Details of what's changed (or not changed)." )
@Description(shortDefinition="Code or observation that resulted from goal", formalDefinition="Details of what's changed (or not changed)." )
protected Type result;
private static final long serialVersionUID = 1994317639L;
@ -311,49 +325,70 @@ public class Goal extends DomainResource {
protected List<Identifier> identifier;
/**
* Identifies the patient/subject whose intended care is described by the plan.
* Identifies the patient, group or organization for whom the goal is being established.
*/
@Child(name = "patient", type = {Patient.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The patient for whom this goal is intended for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." )
protected Reference patient;
@Child(name = "subject", type = {Patient.class, Group.class, Organization.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Who this goal is intended for", formalDefinition="Identifies the patient, group or organization for whom the goal is being established." )
protected Reference subject;
/**
* The actual object that is the target of the reference (Identifies the patient/subject whose intended care is described by the plan.)
* The actual object that is the target of the reference (Identifies the patient, group or organization for whom the goal is being established.)
*/
protected Patient patientTarget;
protected Resource subjectTarget;
/**
* Indicates when the goal is intended to be reached.
* The date or event after which the goal should begin being pursued.
*/
@Child(name = "targetDate", type = {DateType.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Reach goal on or before", formalDefinition="Indicates when the goal is intended to be reached." )
protected DateType targetDate;
@Child(name = "start", type = {DateType.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When goal pursuit begins", formalDefinition="The date or event after which the goal should begin being pursued." )
protected Type start;
/**
* Indicates either the date or the duration after start by which the goal should be met.
*/
@Child(name = "target", type = {DateType.class, Duration.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Reach goal on or before", formalDefinition="Indicates either the date or the duration after start by which the goal should be met." )
protected Type target;
/**
* Indicates a category the goal falls within.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc.", formalDefinition="Indicates a category the goal falls within." )
protected List<CodeableConcept> category;
/**
* Human-readable description of a specific desired objective of care.
*/
@Child(name = "description", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true)
@Child(name = "description", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="What's the desired outcome?", formalDefinition="Human-readable description of a specific desired objective of care." )
protected StringType description;
/**
* Indicates whether the goal has been reached and is still considered relevant.
*/
@Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true)
@Description(shortDefinition="proposed | planned | in-progress | achieved | sustaining | cancelled | accepted | rejected", formalDefinition="Indicates whether the goal has been reached and is still considered relevant." )
@Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
@Description(shortDefinition="proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled", formalDefinition="Indicates whether the goal has been reached and is still considered relevant." )
protected Enumeration<GoalStatus> status;
/**
* Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.
*/
@Child(name = "statusDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Child(name = "statusDate", type = {DateType.class}, order=7, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When goal status took effect", formalDefinition="Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc." )
protected DateType statusDate;
/**
* Captures the reason for the current status.
*/
@Child(name = "statusReason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current status." )
protected CodeableConcept statusReason;
/**
* Indicates whose goal this is - patient goal, practitioner goal, etc.
*/
@Child(name = "author", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Child(name = "author", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=9, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Who's responsible for creating Goal?", formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc." )
protected Reference author;
@ -363,39 +398,39 @@ public class Goal extends DomainResource {
protected Resource authorTarget;
/**
* Identifies the level of importance associated with reaching/sustaining the goal.
* Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.
*/
@Child(name = "priority", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="high | medium |low", formalDefinition="Identifies the level of importance associated with reaching/sustaining the goal." )
@Child(name = "priority", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="high | medium |low", formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." )
protected CodeableConcept priority;
/**
* The identified conditions and other health record elements that are intended to be addressed by the goal.
*/
@Child(name = "concern", type = {Condition.class, Observation.class, MedicationStatement.class, NutritionOrder.class, ProcedureRequest.class, RiskAssessment.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Health issues this goal addresses", formalDefinition="The identified conditions and other health record elements that are intended to be addressed by the goal." )
protected List<Reference> concern;
@Child(name = "addresses", type = {Condition.class, Observation.class, MedicationStatement.class, NutritionOrder.class, ProcedureRequest.class, RiskAssessment.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Issues addressed by this goal", formalDefinition="The identified conditions and other health record elements that are intended to be addressed by the goal." )
protected List<Reference> addresses;
/**
* The actual objects that are the target of the reference (The identified conditions and other health record elements that are intended to be addressed by the goal.)
*/
protected List<Resource> concernTarget;
protected List<Resource> addressesTarget;
/**
* Any comments related to the goal.
*/
@Child(name = "notes", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Child(name = "note", type = {Annotation.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." )
protected StringType notes;
protected List<Annotation> note;
/**
* Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.
*/
@Child(name = "outcome", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Child(name = "outcome", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What was end result of goal?", formalDefinition="Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved." )
protected List<GoalOutcomeComponent> outcome;
private static final long serialVersionUID = -314822558L;
private static final long serialVersionUID = 2029459056L;
/*
* Constructor
@ -454,95 +489,171 @@ public class Goal extends DomainResource {
}
/**
* @return {@link #patient} (Identifies the patient/subject whose intended care is described by the plan.)
* @return {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
*/
public Reference getPatient() {
if (this.patient == null)
public Reference getSubject() {
if (this.subject == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Goal.patient");
throw new Error("Attempt to auto-create Goal.subject");
else if (Configuration.doAutoCreate())
this.patient = new Reference(); // cc
return this.patient;
this.subject = new Reference(); // cc
return this.subject;
}
public boolean hasPatient() {
return this.patient != null && !this.patient.isEmpty();
public boolean hasSubject() {
return this.subject != null && !this.subject.isEmpty();
}
/**
* @param value {@link #patient} (Identifies the patient/subject whose intended care is described by the plan.)
* @param value {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.)
*/
public Goal setPatient(Reference value) {
this.patient = value;
public Goal setSubject(Reference value) {
this.subject = value;
return this;
}
/**
* @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient/subject whose intended care is described by the plan.)
* @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.)
*/
public Patient getPatientTarget() {
if (this.patientTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Goal.patient");
else if (Configuration.doAutoCreate())
this.patientTarget = new Patient(); // aa
return this.patientTarget;
public Resource getSubjectTarget() {
return this.subjectTarget;
}
/**
* @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient/subject whose intended care is described by the plan.)
* @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient, group or organization for whom the goal is being established.)
*/
public Goal setPatientTarget(Patient value) {
this.patientTarget = value;
public Goal setSubjectTarget(Resource value) {
this.subjectTarget = value;
return this;
}
/**
* @return {@link #targetDate} (Indicates when the goal is intended to be reached.). This is the underlying object with id, value and extensions. The accessor "getTargetDate" gives direct access to the value
* @return {@link #start} (The date or event after which the goal should begin being pursued.)
*/
public DateType getTargetDateElement() {
if (this.targetDate == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Goal.targetDate");
else if (Configuration.doAutoCreate())
this.targetDate = new DateType(); // bb
return this.targetDate;
}
public boolean hasTargetDateElement() {
return this.targetDate != null && !this.targetDate.isEmpty();
}
public boolean hasTargetDate() {
return this.targetDate != null && !this.targetDate.isEmpty();
public Type getStart() {
return this.start;
}
/**
* @param value {@link #targetDate} (Indicates when the goal is intended to be reached.). This is the underlying object with id, value and extensions. The accessor "getTargetDate" gives direct access to the value
* @return {@link #start} (The date or event after which the goal should begin being pursued.)
*/
public Goal setTargetDateElement(DateType value) {
this.targetDate = value;
public DateType getStartDateType() throws Exception {
if (!(this.start instanceof DateType))
throw new Exception("Type mismatch: the type DateType was expected, but "+this.start.getClass().getName()+" was encountered");
return (DateType) this.start;
}
public boolean hasStartDateType() throws Exception {
return this.start instanceof DateType;
}
/**
* @return {@link #start} (The date or event after which the goal should begin being pursued.)
*/
public CodeableConcept getStartCodeableConcept() throws Exception {
if (!(this.start instanceof CodeableConcept))
throw new Exception("Type mismatch: the type CodeableConcept was expected, but "+this.start.getClass().getName()+" was encountered");
return (CodeableConcept) this.start;
}
public boolean hasStartCodeableConcept() throws Exception {
return this.start instanceof CodeableConcept;
}
public boolean hasStart() {
return this.start != null && !this.start.isEmpty();
}
/**
* @param value {@link #start} (The date or event after which the goal should begin being pursued.)
*/
public Goal setStart(Type value) {
this.start = value;
return this;
}
/**
* @return Indicates when the goal is intended to be reached.
* @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.)
*/
public Date getTargetDate() {
return this.targetDate == null ? null : this.targetDate.getValue();
public Type getTarget() {
return this.target;
}
/**
* @param value Indicates when the goal is intended to be reached.
* @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.)
*/
public Goal setTargetDate(Date value) {
if (value == null)
this.targetDate = null;
else {
if (this.targetDate == null)
this.targetDate = new DateType();
this.targetDate.setValue(value);
}
public DateType getTargetDateType() throws Exception {
if (!(this.target instanceof DateType))
throw new Exception("Type mismatch: the type DateType was expected, but "+this.target.getClass().getName()+" was encountered");
return (DateType) this.target;
}
public boolean hasTargetDateType() throws Exception {
return this.target instanceof DateType;
}
/**
* @return {@link #target} (Indicates either the date or the duration after start by which the goal should be met.)
*/
public Duration getTargetDuration() throws Exception {
if (!(this.target instanceof Duration))
throw new Exception("Type mismatch: the type Duration was expected, but "+this.target.getClass().getName()+" was encountered");
return (Duration) this.target;
}
public boolean hasTargetDuration() throws Exception {
return this.target instanceof Duration;
}
public boolean hasTarget() {
return this.target != null && !this.target.isEmpty();
}
/**
* @param value {@link #target} (Indicates either the date or the duration after start by which the goal should be met.)
*/
public Goal setTarget(Type value) {
this.target = value;
return this;
}
/**
* @return {@link #category} (Indicates a category the goal falls within.)
*/
public List<CodeableConcept> getCategory() {
if (this.category == null)
this.category = new ArrayList<CodeableConcept>();
return this.category;
}
public boolean hasCategory() {
if (this.category == null)
return false;
for (CodeableConcept item : this.category)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #category} (Indicates a category the goal falls within.)
*/
// syntactic sugar
public CodeableConcept addCategory() { //3
CodeableConcept t = new CodeableConcept();
if (this.category == null)
this.category = new ArrayList<CodeableConcept>();
this.category.add(t);
return t;
}
// syntactic sugar
public Goal addCategory(CodeableConcept t) { //3
if (t == null)
return this;
if (this.category == null)
this.category = new ArrayList<CodeableConcept>();
this.category.add(t);
return this;
}
@ -685,6 +796,30 @@ public class Goal extends DomainResource {
return this;
}
/**
* @return {@link #statusReason} (Captures the reason for the current status.)
*/
public CodeableConcept getStatusReason() {
if (this.statusReason == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Goal.statusReason");
else if (Configuration.doAutoCreate())
this.statusReason = new CodeableConcept(); // cc
return this.statusReason;
}
public boolean hasStatusReason() {
return this.statusReason != null && !this.statusReason.isEmpty();
}
/**
* @param value {@link #statusReason} (Captures the reason for the current status.)
*/
public Goal setStatusReason(CodeableConcept value) {
this.statusReason = value;
return this;
}
/**
* @return {@link #author} (Indicates whose goal this is - patient goal, practitioner goal, etc.)
*/
@ -725,7 +860,7 @@ public class Goal extends DomainResource {
}
/**
* @return {@link #priority} (Identifies the level of importance associated with reaching/sustaining the goal.)
* @return {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
*/
public CodeableConcept getPriority() {
if (this.priority == null)
@ -741,7 +876,7 @@ public class Goal extends DomainResource {
}
/**
* @param value {@link #priority} (Identifies the level of importance associated with reaching/sustaining the goal.)
* @param value {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.)
*/
public Goal setPriority(CodeableConcept value) {
this.priority = value;
@ -749,100 +884,91 @@ public class Goal extends DomainResource {
}
/**
* @return {@link #concern} (The identified conditions and other health record elements that are intended to be addressed by the goal.)
* @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.)
*/
public List<Reference> getConcern() {
if (this.concern == null)
this.concern = new ArrayList<Reference>();
return this.concern;
public List<Reference> getAddresses() {
if (this.addresses == null)
this.addresses = new ArrayList<Reference>();
return this.addresses;
}
public boolean hasConcern() {
if (this.concern == null)
public boolean hasAddresses() {
if (this.addresses == null)
return false;
for (Reference item : this.concern)
for (Reference item : this.addresses)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #concern} (The identified conditions and other health record elements that are intended to be addressed by the goal.)
* @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.)
*/
// syntactic sugar
public Reference addConcern() { //3
public Reference addAddresses() { //3
Reference t = new Reference();
if (this.concern == null)
this.concern = new ArrayList<Reference>();
this.concern.add(t);
if (this.addresses == null)
this.addresses = new ArrayList<Reference>();
this.addresses.add(t);
return t;
}
// syntactic sugar
public Goal addConcern(Reference t) { //3
public Goal addAddresses(Reference t) { //3
if (t == null)
return this;
if (this.concern == null)
this.concern = new ArrayList<Reference>();
this.concern.add(t);
if (this.addresses == null)
this.addresses = new ArrayList<Reference>();
this.addresses.add(t);
return this;
}
/**
* @return {@link #concern} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The identified conditions and other health record elements that are intended to be addressed by the goal.)
* @return {@link #addresses} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The identified conditions and other health record elements that are intended to be addressed by the goal.)
*/
public List<Resource> getConcernTarget() {
if (this.concernTarget == null)
this.concernTarget = new ArrayList<Resource>();
return this.concernTarget;
public List<Resource> getAddressesTarget() {
if (this.addressesTarget == null)
this.addressesTarget = new ArrayList<Resource>();
return this.addressesTarget;
}
/**
* @return {@link #notes} (Any comments related to the goal.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value
* @return {@link #note} (Any comments related to the goal.)
*/
public StringType getNotesElement() {
if (this.notes == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Goal.notes");
else if (Configuration.doAutoCreate())
this.notes = new StringType(); // bb
return this.notes;
public List<Annotation> getNote() {
if (this.note == null)
this.note = new ArrayList<Annotation>();
return this.note;
}
public boolean hasNotesElement() {
return this.notes != null && !this.notes.isEmpty();
}
public boolean hasNotes() {
return this.notes != null && !this.notes.isEmpty();
public boolean hasNote() {
if (this.note == null)
return false;
for (Annotation item : this.note)
if (!item.isEmpty())
return true;
return false;
}
/**
* @param value {@link #notes} (Any comments related to the goal.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value
* @return {@link #note} (Any comments related to the goal.)
*/
public Goal setNotesElement(StringType value) {
this.notes = value;
return this;
// syntactic sugar
public Annotation addNote() { //3
Annotation t = new Annotation();
if (this.note == null)
this.note = new ArrayList<Annotation>();
this.note.add(t);
return t;
}
/**
* @return Any comments related to the goal.
*/
public String getNotes() {
return this.notes == null ? null : this.notes.getValue();
}
/**
* @param value Any comments related to the goal.
*/
public Goal setNotes(String value) {
if (Utilities.noString(value))
this.notes = null;
else {
if (this.notes == null)
this.notes = new StringType();
this.notes.setValue(value);
}
// syntactic sugar
public Goal addNote(Annotation t) { //3
if (t == null)
return this;
if (this.note == null)
this.note = new ArrayList<Annotation>();
this.note.add(t);
return this;
}
@ -889,15 +1015,18 @@ public class Goal extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("patient", "Reference(Patient)", "Identifies the patient/subject whose intended care is described by the plan.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("targetDate", "date", "Indicates when the goal is intended to be reached.", 0, java.lang.Integer.MAX_VALUE, targetDate));
childrenList.add(new Property("subject", "Reference(Patient|Group|Organization)", "Identifies the patient, group or organization for whom the goal is being established.", 0, java.lang.Integer.MAX_VALUE, subject));
childrenList.add(new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, java.lang.Integer.MAX_VALUE, start));
childrenList.add(new Property("target[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, java.lang.Integer.MAX_VALUE, target));
childrenList.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category));
childrenList.add(new Property("description", "string", "Human-readable description of a specific desired objective of care.", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("status", "code", "Indicates whether the goal has been reached and is still considered relevant.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("statusDate", "date", "Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.", 0, java.lang.Integer.MAX_VALUE, statusDate));
childrenList.add(new Property("statusReason", "CodeableConcept", "Captures the reason for the current status.", 0, java.lang.Integer.MAX_VALUE, statusReason));
childrenList.add(new Property("author", "Reference(Patient|Practitioner|RelatedPerson)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, java.lang.Integer.MAX_VALUE, author));
childrenList.add(new Property("priority", "CodeableConcept", "Identifies the level of importance associated with reaching/sustaining the goal.", 0, java.lang.Integer.MAX_VALUE, priority));
childrenList.add(new Property("concern", "Reference(Condition|Observation|MedicationStatement|NutritionOrder|ProcedureRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, concern));
childrenList.add(new Property("notes", "string", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, notes));
childrenList.add(new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, java.lang.Integer.MAX_VALUE, priority));
childrenList.add(new Property("addresses", "Reference(Condition|Observation|MedicationStatement|NutritionOrder|ProcedureRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses));
childrenList.add(new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note));
childrenList.add(new Property("outcome", "", "Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.", 0, java.lang.Integer.MAX_VALUE, outcome));
}
@ -909,19 +1038,30 @@ public class Goal extends DomainResource {
for (Identifier i : identifier)
dst.identifier.add(i.copy());
};
dst.patient = patient == null ? null : patient.copy();
dst.targetDate = targetDate == null ? null : targetDate.copy();
dst.subject = subject == null ? null : subject.copy();
dst.start = start == null ? null : start.copy();
dst.target = target == null ? null : target.copy();
if (category != null) {
dst.category = new ArrayList<CodeableConcept>();
for (CodeableConcept i : category)
dst.category.add(i.copy());
};
dst.description = description == null ? null : description.copy();
dst.status = status == null ? null : status.copy();
dst.statusDate = statusDate == null ? null : statusDate.copy();
dst.statusReason = statusReason == null ? null : statusReason.copy();
dst.author = author == null ? null : author.copy();
dst.priority = priority == null ? null : priority.copy();
if (concern != null) {
dst.concern = new ArrayList<Reference>();
for (Reference i : concern)
dst.concern.add(i.copy());
if (addresses != null) {
dst.addresses = new ArrayList<Reference>();
for (Reference i : addresses)
dst.addresses.add(i.copy());
};
if (note != null) {
dst.note = new ArrayList<Annotation>();
for (Annotation i : note)
dst.note.add(i.copy());
};
dst.notes = notes == null ? null : notes.copy();
if (outcome != null) {
dst.outcome = new ArrayList<GoalOutcomeComponent>();
for (GoalOutcomeComponent i : outcome)
@ -941,10 +1081,11 @@ public class Goal extends DomainResource {
if (!(other instanceof Goal))
return false;
Goal o = (Goal) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(targetDate, o.targetDate, true)
&& compareDeep(description, o.description, true) && compareDeep(status, o.status, true) && compareDeep(statusDate, o.statusDate, true)
&& compareDeep(author, o.author, true) && compareDeep(priority, o.priority, true) && compareDeep(concern, o.concern, true)
&& compareDeep(notes, o.notes, true) && compareDeep(outcome, o.outcome, true);
return compareDeep(identifier, o.identifier, true) && compareDeep(subject, o.subject, true) && compareDeep(start, o.start, true)
&& compareDeep(target, o.target, true) && compareDeep(category, o.category, true) && compareDeep(description, o.description, true)
&& compareDeep(status, o.status, true) && compareDeep(statusDate, o.statusDate, true) && compareDeep(statusReason, o.statusReason, true)
&& compareDeep(author, o.author, true) && compareDeep(priority, o.priority, true) && compareDeep(addresses, o.addresses, true)
&& compareDeep(note, o.note, true) && compareDeep(outcome, o.outcome, true);
}
@Override
@ -954,17 +1095,17 @@ public class Goal extends DomainResource {
if (!(other instanceof Goal))
return false;
Goal o = (Goal) other;
return compareValues(targetDate, o.targetDate, true) && compareValues(description, o.description, true)
&& compareValues(status, o.status, true) && compareValues(statusDate, o.statusDate, true) && compareValues(notes, o.notes, true)
return compareValues(description, o.description, true) && compareValues(status, o.status, true) && compareValues(statusDate, o.statusDate, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty())
&& (targetDate == null || targetDate.isEmpty()) && (description == null || description.isEmpty())
&& (status == null || status.isEmpty()) && (statusDate == null || statusDate.isEmpty()) && (author == null || author.isEmpty())
&& (priority == null || priority.isEmpty()) && (concern == null || concern.isEmpty()) && (notes == null || notes.isEmpty())
&& (outcome == null || outcome.isEmpty());
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty())
&& (start == null || start.isEmpty()) && (target == null || target.isEmpty()) && (category == null || category.isEmpty())
&& (description == null || description.isEmpty()) && (status == null || status.isEmpty())
&& (statusDate == null || statusDate.isEmpty()) && (statusReason == null || statusReason.isEmpty())
&& (author == null || author.isEmpty()) && (priority == null || priority.isEmpty()) && (addresses == null || addresses.isEmpty())
&& (note == null || note.isEmpty()) && (outcome == null || outcome.isEmpty());
}
@Override
@ -972,8 +1113,18 @@ public class Goal extends DomainResource {
return ResourceType.Goal;
}
@SearchParamDefinition(name="patient", path="Goal.patient", description="The patient for whom this goal is intended for", type="reference" )
@SearchParamDefinition(name="identifier", path="Goal.identifier", description="External Ids for this goal", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="patient", path="Goal.subject", description="Who this goal is intended for", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="subject", path="Goal.subject", description="Who this goal is intended for", type="reference" )
public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="targetdate", path="Goal.targetDate", description="Reach goal on or before", type="date" )
public static final String SP_TARGETDATE = "targetdate";
@SearchParamDefinition(name="category", path="Goal.category", description="E.g. Treatment, dietary, behavioral, etc.", type="token" )
public static final String SP_CATEGORY = "category";
@SearchParamDefinition(name="status", path="Goal.status", description="proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled", type="token" )
public static final String SP_STATUS = "status";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -780,10 +780,24 @@ public class HealthcareService extends DomainResource {
*/
protected Organization providedByTarget;
/**
* Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type.
*/
@Child(name = "serviceCategory", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type", formalDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type." )
protected CodeableConcept serviceCategory;
/**
* A specific type of service that may be delivered or performed.
*/
@Child(name = "serviceType", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="A specific type of service that may be delivered or performed", formalDefinition="A specific type of service that may be delivered or performed." )
protected List<ServiceTypeComponent> serviceType;
/**
* The location where this healthcare service may be provided.
*/
@Child(name = "location", type = {Location.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Child(name = "location", type = {Location.class}, order=4, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="The location where this healthcare service may be provided", formalDefinition="The location where this healthcare service may be provided." )
protected Reference location;
@ -792,20 +806,6 @@ public class HealthcareService extends DomainResource {
*/
protected Location locationTarget;
/**
* Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type.
*/
@Child(name = "serviceCategory", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type", formalDefinition="Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type." )
protected CodeableConcept serviceCategory;
/**
* A specific type of service that may be delivered or performed.
*/
@Child(name = "serviceType", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="A specific type of service that may be delivered or performed", formalDefinition="A specific type of service that may be delivered or performed." )
protected List<ServiceTypeComponent> serviceType;
/**
* Further description of the service as it would be presented to a consumer while searching.
*/
@ -930,7 +930,7 @@ public class HealthcareService extends DomainResource {
@Description(shortDefinition="A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times", formalDefinition="A description of Site availability exceptions, e.g., public holiday availability. Succinctly describing all possible exceptions to normal Site availability as details in the Available Times and Not Available Times." )
protected StringType availabilityExceptions;
private static final long serialVersionUID = 543354370L;
private static final long serialVersionUID = 683771126L;
/*
* Constructor
@ -1031,50 +1031,6 @@ public class HealthcareService extends DomainResource {
return this;
}
/**
* @return {@link #location} (The location where this healthcare service may be provided.)
*/
public Reference getLocation() {
if (this.location == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create HealthcareService.location");
else if (Configuration.doAutoCreate())
this.location = new Reference(); // cc
return this.location;
}
public boolean hasLocation() {
return this.location != null && !this.location.isEmpty();
}
/**
* @param value {@link #location} (The location where this healthcare service may be provided.)
*/
public HealthcareService setLocation(Reference value) {
this.location = value;
return this;
}
/**
* @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.)
*/
public Location getLocationTarget() {
if (this.locationTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create HealthcareService.location");
else if (Configuration.doAutoCreate())
this.locationTarget = new Location(); // aa
return this.locationTarget;
}
/**
* @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.)
*/
public HealthcareService setLocationTarget(Location value) {
this.locationTarget = value;
return this;
}
/**
* @return {@link #serviceCategory} (Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type.)
*/
@ -1139,6 +1095,50 @@ public class HealthcareService extends DomainResource {
return this;
}
/**
* @return {@link #location} (The location where this healthcare service may be provided.)
*/
public Reference getLocation() {
if (this.location == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create HealthcareService.location");
else if (Configuration.doAutoCreate())
this.location = new Reference(); // cc
return this.location;
}
public boolean hasLocation() {
return this.location != null && !this.location.isEmpty();
}
/**
* @param value {@link #location} (The location where this healthcare service may be provided.)
*/
public HealthcareService setLocation(Reference value) {
this.location = value;
return this;
}
/**
* @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.)
*/
public Location getLocationTarget() {
if (this.locationTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create HealthcareService.location");
else if (Configuration.doAutoCreate())
this.locationTarget = new Location(); // aa
return this.locationTarget;
}
/**
* @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.)
*/
public HealthcareService setLocationTarget(Location value) {
this.locationTarget = value;
return this;
}
/**
* @return {@link #serviceName} (Further description of the service as it would be presented to a consumer while searching.). This is the underlying object with id, value and extensions. The accessor "getServiceName" gives direct access to the value
*/
@ -1885,9 +1885,9 @@ public class HealthcareService extends DomainResource {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "External Identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("providedBy", "Reference(Organization)", "The organization that provides this Healthcare Service.", 0, java.lang.Integer.MAX_VALUE, providedBy));
childrenList.add(new Property("location", "Reference(Location)", "The location where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location));
childrenList.add(new Property("serviceCategory", "CodeableConcept", "Identifies the broad category of service being performed or delivered. Selecting a Service Category then determines the list of relevant service types that can be selected in the Primary Service Type.", 0, java.lang.Integer.MAX_VALUE, serviceCategory));
childrenList.add(new Property("serviceType", "", "A specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, serviceType));
childrenList.add(new Property("location", "Reference(Location)", "The location where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location));
childrenList.add(new Property("serviceName", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, java.lang.Integer.MAX_VALUE, serviceName));
childrenList.add(new Property("comment", "string", "Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", 0, java.lang.Integer.MAX_VALUE, comment));
childrenList.add(new Property("extraDetails", "string", "Extra details about the service that can't be placed in the other fields.", 0, java.lang.Integer.MAX_VALUE, extraDetails));
@ -1916,13 +1916,13 @@ public class HealthcareService extends DomainResource {
dst.identifier.add(i.copy());
};
dst.providedBy = providedBy == null ? null : providedBy.copy();
dst.location = location == null ? null : location.copy();
dst.serviceCategory = serviceCategory == null ? null : serviceCategory.copy();
if (serviceType != null) {
dst.serviceType = new ArrayList<ServiceTypeComponent>();
for (ServiceTypeComponent i : serviceType)
dst.serviceType.add(i.copy());
};
dst.location = location == null ? null : location.copy();
dst.serviceName = serviceName == null ? null : serviceName.copy();
dst.comment = comment == null ? null : comment.copy();
dst.extraDetails = extraDetails == null ? null : extraDetails.copy();
@ -1987,10 +1987,10 @@ public class HealthcareService extends DomainResource {
return false;
HealthcareService o = (HealthcareService) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(providedBy, o.providedBy, true)
&& compareDeep(location, o.location, true) && compareDeep(serviceCategory, o.serviceCategory, true)
&& compareDeep(serviceType, o.serviceType, true) && compareDeep(serviceName, o.serviceName, true)
&& compareDeep(comment, o.comment, true) && compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true)
&& compareDeep(telecom, o.telecom, true) && compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true)
&& compareDeep(serviceCategory, o.serviceCategory, true) && compareDeep(serviceType, o.serviceType, true)
&& compareDeep(location, o.location, true) && compareDeep(serviceName, o.serviceName, true) && compareDeep(comment, o.comment, true)
&& compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true) && compareDeep(telecom, o.telecom, true)
&& compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true)
&& compareDeep(eligibility, o.eligibility, true) && compareDeep(eligibilityNote, o.eligibilityNote, true)
&& compareDeep(programName, o.programName, true) && compareDeep(characteristic, o.characteristic, true)
&& compareDeep(referralMethod, o.referralMethod, true) && compareDeep(publicKey, o.publicKey, true)
@ -2014,8 +2014,8 @@ public class HealthcareService extends DomainResource {
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (providedBy == null || providedBy.isEmpty())
&& (location == null || location.isEmpty()) && (serviceCategory == null || serviceCategory.isEmpty())
&& (serviceType == null || serviceType.isEmpty()) && (serviceName == null || serviceName.isEmpty())
&& (serviceCategory == null || serviceCategory.isEmpty()) && (serviceType == null || serviceType.isEmpty())
&& (location == null || location.isEmpty()) && (serviceName == null || serviceName.isEmpty())
&& (comment == null || comment.isEmpty()) && (extraDetails == null || extraDetails.isEmpty())
&& (photo == null || photo.isEmpty()) && (telecom == null || telecom.isEmpty()) && (coverageArea == null || coverageArea.isEmpty())
&& (serviceProvisionCode == null || serviceProvisionCode.isEmpty()) && (eligibility == null || eligibility.isEmpty())

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.Description;
import org.hl7.fhir.instance.model.annotations.Block;
import org.hl7.fhir.instance.model.api.*;
/**
* Immunization event information.
* Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.
*/
@ResourceDef(name="Immunization", profile="http://hl7.org/fhir/Profile/Immunization")
public class Immunization extends DomainResource {
@ -51,14 +51,14 @@ public class Immunization extends DomainResource {
/**
* Reasons why a vaccine was administered.
*/
@Child(name = "reason", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "reason", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Why immunization occurred", formalDefinition="Reasons why a vaccine was administered." )
protected List<CodeableConcept> reason;
/**
* Reason why a vaccine was not administered.
*/
@Child(name = "reasonNotGiven", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "reasonNotGiven", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Why immunization did not occur", formalDefinition="Reason why a vaccine was not administered." )
protected List<CodeableConcept> reasonNotGiven;
@ -206,14 +206,14 @@ public class Immunization extends DomainResource {
/**
* Date of reaction to the immunization.
*/
@Child(name = "date", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Child(name = "date", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When did reaction start?", formalDefinition="Date of reaction to the immunization." )
protected DateTimeType date;
/**
* Details of the reaction.
*/
@Child(name = "detail", type = {Observation.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Child(name = "detail", type = {Observation.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Additional information on reaction", formalDefinition="Details of the reaction." )
protected Reference detail;
@ -225,7 +225,7 @@ public class Immunization extends DomainResource {
/**
* Self-reported indicator.
*/
@Child(name = "reported", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Child(name = "reported", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Was reaction self-reported?", formalDefinition="Self-reported indicator." )
protected BooleanType reported;
@ -425,21 +425,21 @@ public class Immunization extends DomainResource {
/**
* Nominal position in a series.
*/
@Child(name = "doseSequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Child(name = "doseSequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="What dose number within series?", formalDefinition="Nominal position in a series." )
protected PositiveIntType doseSequence;
/**
* Contains the description about the protocol under which the vaccine was administered.
*/
@Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Details of vaccine protocol", formalDefinition="Contains the description about the protocol under which the vaccine was administered." )
protected StringType description;
/**
* Indicates the authority who published the protocol? E.g. ACIP.
*/
@Child(name = "authority", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Child(name = "authority", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Who is responsible for protocol", formalDefinition="Indicates the authority who published the protocol? E.g. ACIP." )
protected Reference authority;
@ -451,39 +451,39 @@ public class Immunization extends DomainResource {
/**
* One possible path to achieve presumed immunity against a disease - within the context of an authority.
*/
@Child(name = "series", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
@Child(name = "series", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Name of vaccine series", formalDefinition="One possible path to achieve presumed immunity against a disease - within the context of an authority." )
protected StringType series;
/**
* The recommended number of doses to achieve immunity.
*/
@Child(name = "seriesDoses", type = {PositiveIntType.class}, order=5, min=0, max=1, modifier=false, summary=true)
@Child(name = "seriesDoses", type = {PositiveIntType.class}, order=5, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Recommended number of doses for immunity", formalDefinition="The recommended number of doses to achieve immunity." )
protected PositiveIntType seriesDoses;
/**
* The targeted disease.
*/
@Child(name = "doseTarget", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=true)
@Child(name = "targetDisease", type = {CodeableConcept.class}, order=6, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Disease immunized against", formalDefinition="The targeted disease." )
protected CodeableConcept doseTarget;
protected List<CodeableConcept> targetDisease;
/**
* Indicates if the immunization event should "count" against the protocol.
*/
@Child(name = "doseStatus", type = {CodeableConcept.class}, order=7, min=1, max=1, modifier=false, summary=true)
@Child(name = "doseStatus", type = {CodeableConcept.class}, order=7, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Does dose count towards immunity?", formalDefinition="Indicates if the immunization event should \"count\" against the protocol." )
protected CodeableConcept doseStatus;
/**
* Provides an explanation as to why a immunization event should or should not count against the protocol.
*/
@Child(name = "doseStatusReason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
@Child(name = "doseStatusReason", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Why does does count/not count?", formalDefinition="Provides an explanation as to why a immunization event should or should not count against the protocol." )
protected CodeableConcept doseStatusReason;
private static final long serialVersionUID = -783437472L;
private static final long serialVersionUID = 386814037L;
/*
* Constructor
@ -495,10 +495,9 @@ public class Immunization extends DomainResource {
/*
* Constructor
*/
public ImmunizationVaccinationProtocolComponent(PositiveIntType doseSequence, CodeableConcept doseTarget, CodeableConcept doseStatus) {
public ImmunizationVaccinationProtocolComponent(PositiveIntType doseSequence, CodeableConcept doseStatus) {
super();
this.doseSequence = doseSequence;
this.doseTarget = doseTarget;
this.doseStatus = doseStatus;
}
@ -735,26 +734,42 @@ public class Immunization extends DomainResource {
}
/**
* @return {@link #doseTarget} (The targeted disease.)
* @return {@link #targetDisease} (The targeted disease.)
*/
public CodeableConcept getDoseTarget() {
if (this.doseTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ImmunizationVaccinationProtocolComponent.doseTarget");
else if (Configuration.doAutoCreate())
this.doseTarget = new CodeableConcept(); // cc
return this.doseTarget;
public List<CodeableConcept> getTargetDisease() {
if (this.targetDisease == null)
this.targetDisease = new ArrayList<CodeableConcept>();
return this.targetDisease;
}
public boolean hasDoseTarget() {
return this.doseTarget != null && !this.doseTarget.isEmpty();
public boolean hasTargetDisease() {
if (this.targetDisease == null)
return false;
for (CodeableConcept item : this.targetDisease)
if (!item.isEmpty())
return true;
return false;
}
/**
* @param value {@link #doseTarget} (The targeted disease.)
* @return {@link #targetDisease} (The targeted disease.)
*/
public ImmunizationVaccinationProtocolComponent setDoseTarget(CodeableConcept value) {
this.doseTarget = value;
// syntactic sugar
public CodeableConcept addTargetDisease() { //3
CodeableConcept t = new CodeableConcept();
if (this.targetDisease == null)
this.targetDisease = new ArrayList<CodeableConcept>();
this.targetDisease.add(t);
return t;
}
// syntactic sugar
public ImmunizationVaccinationProtocolComponent addTargetDisease(CodeableConcept t) { //3
if (t == null)
return this;
if (this.targetDisease == null)
this.targetDisease = new ArrayList<CodeableConcept>();
this.targetDisease.add(t);
return this;
}
@ -813,7 +828,7 @@ public class Immunization extends DomainResource {
childrenList.add(new Property("authority", "Reference(Organization)", "Indicates the authority who published the protocol? E.g. ACIP.", 0, java.lang.Integer.MAX_VALUE, authority));
childrenList.add(new Property("series", "string", "One possible path to achieve presumed immunity against a disease - within the context of an authority.", 0, java.lang.Integer.MAX_VALUE, series));
childrenList.add(new Property("seriesDoses", "positiveInt", "The recommended number of doses to achieve immunity.", 0, java.lang.Integer.MAX_VALUE, seriesDoses));
childrenList.add(new Property("doseTarget", "CodeableConcept", "The targeted disease.", 0, java.lang.Integer.MAX_VALUE, doseTarget));
childrenList.add(new Property("targetDisease", "CodeableConcept", "The targeted disease.", 0, java.lang.Integer.MAX_VALUE, targetDisease));
childrenList.add(new Property("doseStatus", "CodeableConcept", "Indicates if the immunization event should \"count\" against the protocol.", 0, java.lang.Integer.MAX_VALUE, doseStatus));
childrenList.add(new Property("doseStatusReason", "CodeableConcept", "Provides an explanation as to why a immunization event should or should not count against the protocol.", 0, java.lang.Integer.MAX_VALUE, doseStatusReason));
}
@ -826,7 +841,11 @@ public class Immunization extends DomainResource {
dst.authority = authority == null ? null : authority.copy();
dst.series = series == null ? null : series.copy();
dst.seriesDoses = seriesDoses == null ? null : seriesDoses.copy();
dst.doseTarget = doseTarget == null ? null : doseTarget.copy();
if (targetDisease != null) {
dst.targetDisease = new ArrayList<CodeableConcept>();
for (CodeableConcept i : targetDisease)
dst.targetDisease.add(i.copy());
};
dst.doseStatus = doseStatus == null ? null : doseStatus.copy();
dst.doseStatusReason = doseStatusReason == null ? null : doseStatusReason.copy();
return dst;
@ -841,8 +860,8 @@ public class Immunization extends DomainResource {
ImmunizationVaccinationProtocolComponent o = (ImmunizationVaccinationProtocolComponent) other;
return compareDeep(doseSequence, o.doseSequence, true) && compareDeep(description, o.description, true)
&& compareDeep(authority, o.authority, true) && compareDeep(series, o.series, true) && compareDeep(seriesDoses, o.seriesDoses, true)
&& compareDeep(doseTarget, o.doseTarget, true) && compareDeep(doseStatus, o.doseStatus, true) && compareDeep(doseStatusReason, o.doseStatusReason, true)
;
&& compareDeep(targetDisease, o.targetDisease, true) && compareDeep(doseStatus, o.doseStatus, true)
&& compareDeep(doseStatusReason, o.doseStatusReason, true);
}
@Override
@ -859,7 +878,7 @@ public class Immunization extends DomainResource {
public boolean isEmpty() {
return super.isEmpty() && (doseSequence == null || doseSequence.isEmpty()) && (description == null || description.isEmpty())
&& (authority == null || authority.isEmpty()) && (series == null || series.isEmpty()) && (seriesDoses == null || seriesDoses.isEmpty())
&& (doseTarget == null || doseTarget.isEmpty()) && (doseStatus == null || doseStatus.isEmpty())
&& (targetDisease == null || targetDisease.isEmpty()) && (doseStatus == null || doseStatus.isEmpty())
&& (doseStatusReason == null || doseStatusReason.isEmpty());
}
@ -868,28 +887,35 @@ public class Immunization extends DomainResource {
/**
* A unique identifier assigned to this immunization record.
*/
@Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Business identifier", formalDefinition="A unique identifier assigned to this immunization record." )
protected List<Identifier> identifier;
/**
* Indicates the current status of the vaccination event.
*/
@Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
@Description(shortDefinition="in-progress | on-hold | completed | entered-in-error | stopped", formalDefinition="Indicates the current status of the vaccination event." )
protected CodeType status;
/**
* Date vaccine administered or was to be administered.
*/
@Child(name = "date", type = {DateTimeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Vaccination administration date", formalDefinition="Date vaccine administered or was to be administered." )
protected DateTimeType date;
/**
* Vaccine that was administered or was to be administered.
*/
@Child(name = "vaccineType", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Child(name = "vaccineCode", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Vaccine product administered", formalDefinition="Vaccine that was administered or was to be administered." )
protected CodeableConcept vaccineType;
protected CodeableConcept vaccineCode;
/**
* The patient who either received or did not receive the immunization.
*/
@Child(name = "patient", type = {Patient.class}, order=3, min=1, max=1, modifier=false, summary=true)
@Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Who was immunized?", formalDefinition="The patient who either received or did not receive the immunization." )
protected Reference patient;
@ -901,21 +927,21 @@ public class Immunization extends DomainResource {
/**
* Indicates if the vaccination was or was not given.
*/
@Child(name = "wasNotGiven", type = {BooleanType.class}, order=4, min=1, max=1, modifier=true, summary=true)
@Child(name = "wasNotGiven", type = {BooleanType.class}, order=5, min=1, max=1, modifier=true, summary=false)
@Description(shortDefinition="Flag for whether immunization was given", formalDefinition="Indicates if the vaccination was or was not given." )
protected BooleanType wasNotGiven;
/**
* True if this administration was reported rather than directly administered.
*/
@Child(name = "reported", type = {BooleanType.class}, order=5, min=1, max=1, modifier=false, summary=true)
@Child(name = "reported", type = {BooleanType.class}, order=6, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Is this a self-reported record?", formalDefinition="True if this administration was reported rather than directly administered." )
protected BooleanType reported;
/**
* Clinician who administered the vaccine.
*/
@Child(name = "performer", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Child(name = "performer", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Who administered vaccine?", formalDefinition="Clinician who administered the vaccine." )
protected Reference performer;
@ -927,7 +953,7 @@ public class Immunization extends DomainResource {
/**
* Clinician who ordered the vaccination.
*/
@Child(name = "requester", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=true)
@Child(name = "requester", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Who ordered vaccination?", formalDefinition="Clinician who ordered the vaccination." )
protected Reference requester;
@ -939,7 +965,7 @@ public class Immunization extends DomainResource {
/**
* The visit or admission or other contact between patient and health care provider the immunization was performed as part of.
*/
@Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=true)
@Child(name = "encounter", type = {Encounter.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." )
protected Reference encounter;
@ -951,7 +977,7 @@ public class Immunization extends DomainResource {
/**
* Name of vaccine manufacturer.
*/
@Child(name = "manufacturer", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true)
@Child(name = "manufacturer", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Vaccine manufacturer", formalDefinition="Name of vaccine manufacturer." )
protected Reference manufacturer;
@ -963,7 +989,7 @@ public class Immunization extends DomainResource {
/**
* The service delivery location where the vaccine administration occurred.
*/
@Child(name = "location", type = {Location.class}, order=10, min=0, max=1, modifier=false, summary=true)
@Child(name = "location", type = {Location.class}, order=11, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Where did vaccination occur?", formalDefinition="The service delivery location where the vaccine administration occurred." )
protected Reference location;
@ -975,60 +1001,67 @@ public class Immunization extends DomainResource {
/**
* Lot number of the vaccine product.
*/
@Child(name = "lotNumber", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=true)
@Child(name = "lotNumber", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Vaccine lot number", formalDefinition="Lot number of the vaccine product." )
protected StringType lotNumber;
/**
* Date vaccine batch expires.
*/
@Child(name = "expirationDate", type = {DateType.class}, order=12, min=0, max=1, modifier=false, summary=true)
@Child(name = "expirationDate", type = {DateType.class}, order=13, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Vaccine expiration date", formalDefinition="Date vaccine batch expires." )
protected DateType expirationDate;
/**
* Body site where vaccine was administered.
*/
@Child(name = "site", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=true)
@Child(name = "site", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Body site vaccine was administered", formalDefinition="Body site where vaccine was administered." )
protected CodeableConcept site;
/**
* The path by which the vaccine product is taken into the body.
*/
@Child(name = "route", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=true)
@Child(name = "route", type = {CodeableConcept.class}, order=15, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="How vaccine entered body", formalDefinition="The path by which the vaccine product is taken into the body." )
protected CodeableConcept route;
/**
* The quantity of vaccine product that was administered.
*/
@Child(name = "doseQuantity", type = {SimpleQuantity.class}, order=15, min=0, max=1, modifier=false, summary=true)
@Child(name = "doseQuantity", type = {SimpleQuantity.class}, order=16, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Amount of vaccine administered", formalDefinition="The quantity of vaccine product that was administered." )
protected SimpleQuantity doseQuantity;
/**
* Extra information about the immunization that is not conveyed by the other attributes.
*/
@Child(name = "note", type = {Annotation.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Vaccination notes", formalDefinition="Extra information about the immunization that is not conveyed by the other attributes." )
protected List<Annotation> note;
/**
* Reasons why a vaccine was or was not administered.
*/
@Child(name = "explanation", type = {}, order=16, min=0, max=1, modifier=false, summary=true)
@Child(name = "explanation", type = {}, order=18, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Administration / non-administration reasons", formalDefinition="Reasons why a vaccine was or was not administered." )
protected ImmunizationExplanationComponent explanation;
/**
* Categorical data indicating that an adverse event is associated in time to an immunization.
*/
@Child(name = "reaction", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "reaction", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Details of a reaction that follows immunization", formalDefinition="Categorical data indicating that an adverse event is associated in time to an immunization." )
protected List<ImmunizationReactionComponent> reaction;
/**
* Contains information about the protocol(s) under which the vaccine was administered.
*/
@Child(name = "vaccinationProtocol", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "vaccinationProtocol", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What protocol was followed", formalDefinition="Contains information about the protocol(s) under which the vaccine was administered." )
protected List<ImmunizationVaccinationProtocolComponent> vaccinationProtocol;
private static final long serialVersionUID = -224069771L;
private static final long serialVersionUID = 898786200L;
/*
* Constructor
@ -1040,10 +1073,10 @@ public class Immunization extends DomainResource {
/*
* Constructor
*/
public Immunization(DateTimeType date, CodeableConcept vaccineType, Reference patient, BooleanType wasNotGiven, BooleanType reported) {
public Immunization(CodeType status, CodeableConcept vaccineCode, Reference patient, BooleanType wasNotGiven, BooleanType reported) {
super();
this.date = date;
this.vaccineType = vaccineType;
this.status = status;
this.vaccineCode = vaccineCode;
this.patient = patient;
this.wasNotGiven = wasNotGiven;
this.reported = reported;
@ -1089,6 +1122,51 @@ public class Immunization extends DomainResource {
return this;
}
/**
* @return {@link #status} (Indicates the current status of the vaccination event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public CodeType getStatusElement() {
if (this.status == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Immunization.status");
else if (Configuration.doAutoCreate())
this.status = new CodeType(); // bb
return this.status;
}
public boolean hasStatusElement() {
return this.status != null && !this.status.isEmpty();
}
public boolean hasStatus() {
return this.status != null && !this.status.isEmpty();
}
/**
* @param value {@link #status} (Indicates the current status of the vaccination event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public Immunization setStatusElement(CodeType value) {
this.status = value;
return this;
}
/**
* @return Indicates the current status of the vaccination event.
*/
public String getStatus() {
return this.status == null ? null : this.status.getValue();
}
/**
* @param value Indicates the current status of the vaccination event.
*/
public Immunization setStatus(String value) {
if (this.status == null)
this.status = new CodeType();
this.status.setValue(value);
return this;
}
/**
* @return {@link #date} (Date vaccine administered or was to be administered.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
@ -1128,33 +1206,37 @@ public class Immunization extends DomainResource {
* @param value Date vaccine administered or was to be administered.
*/
public Immunization setDate(Date value) {
if (value == null)
this.date = null;
else {
if (this.date == null)
this.date = new DateTimeType();
this.date.setValue(value);
}
return this;
}
/**
* @return {@link #vaccineType} (Vaccine that was administered or was to be administered.)
* @return {@link #vaccineCode} (Vaccine that was administered or was to be administered.)
*/
public CodeableConcept getVaccineType() {
if (this.vaccineType == null)
public CodeableConcept getVaccineCode() {
if (this.vaccineCode == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Immunization.vaccineType");
throw new Error("Attempt to auto-create Immunization.vaccineCode");
else if (Configuration.doAutoCreate())
this.vaccineType = new CodeableConcept(); // cc
return this.vaccineType;
this.vaccineCode = new CodeableConcept(); // cc
return this.vaccineCode;
}
public boolean hasVaccineType() {
return this.vaccineType != null && !this.vaccineType.isEmpty();
public boolean hasVaccineCode() {
return this.vaccineCode != null && !this.vaccineCode.isEmpty();
}
/**
* @param value {@link #vaccineType} (Vaccine that was administered or was to be administered.)
* @param value {@link #vaccineCode} (Vaccine that was administered or was to be administered.)
*/
public Immunization setVaccineType(CodeableConcept value) {
this.vaccineType = value;
public Immunization setVaccineCode(CodeableConcept value) {
this.vaccineCode = value;
return this;
}
@ -1682,6 +1764,46 @@ public class Immunization extends DomainResource {
return this;
}
/**
* @return {@link #note} (Extra information about the immunization that is not conveyed by the other attributes.)
*/
public List<Annotation> getNote() {
if (this.note == null)
this.note = new ArrayList<Annotation>();
return this.note;
}
public boolean hasNote() {
if (this.note == null)
return false;
for (Annotation item : this.note)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #note} (Extra information about the immunization that is not conveyed by the other attributes.)
*/
// syntactic sugar
public Annotation addNote() { //3
Annotation t = new Annotation();
if (this.note == null)
this.note = new ArrayList<Annotation>();
this.note.add(t);
return t;
}
// syntactic sugar
public Immunization addNote(Annotation t) { //3
if (t == null)
return this;
if (this.note == null)
this.note = new ArrayList<Annotation>();
this.note.add(t);
return this;
}
/**
* @return {@link #explanation} (Reasons why a vaccine was or was not administered.)
*/
@ -1789,8 +1911,9 @@ public class Immunization extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("identifier", "Identifier", "A unique identifier assigned to this immunization record.", 0, java.lang.Integer.MAX_VALUE, identifier));
childrenList.add(new Property("status", "code", "Indicates the current status of the vaccination event.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("date", "dateTime", "Date vaccine administered or was to be administered.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("vaccineType", "CodeableConcept", "Vaccine that was administered or was to be administered.", 0, java.lang.Integer.MAX_VALUE, vaccineType));
childrenList.add(new Property("vaccineCode", "CodeableConcept", "Vaccine that was administered or was to be administered.", 0, java.lang.Integer.MAX_VALUE, vaccineCode));
childrenList.add(new Property("patient", "Reference(Patient)", "The patient who either received or did not receive the immunization.", 0, java.lang.Integer.MAX_VALUE, patient));
childrenList.add(new Property("wasNotGiven", "boolean", "Indicates if the vaccination was or was not given.", 0, java.lang.Integer.MAX_VALUE, wasNotGiven));
childrenList.add(new Property("reported", "boolean", "True if this administration was reported rather than directly administered.", 0, java.lang.Integer.MAX_VALUE, reported));
@ -1804,6 +1927,7 @@ public class Immunization extends DomainResource {
childrenList.add(new Property("site", "CodeableConcept", "Body site where vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, site));
childrenList.add(new Property("route", "CodeableConcept", "The path by which the vaccine product is taken into the body.", 0, java.lang.Integer.MAX_VALUE, route));
childrenList.add(new Property("doseQuantity", "SimpleQuantity", "The quantity of vaccine product that was administered.", 0, java.lang.Integer.MAX_VALUE, doseQuantity));
childrenList.add(new Property("note", "Annotation", "Extra information about the immunization that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note));
childrenList.add(new Property("explanation", "", "Reasons why a vaccine was or was not administered.", 0, java.lang.Integer.MAX_VALUE, explanation));
childrenList.add(new Property("reaction", "", "Categorical data indicating that an adverse event is associated in time to an immunization.", 0, java.lang.Integer.MAX_VALUE, reaction));
childrenList.add(new Property("vaccinationProtocol", "", "Contains information about the protocol(s) under which the vaccine was administered.", 0, java.lang.Integer.MAX_VALUE, vaccinationProtocol));
@ -1817,8 +1941,9 @@ public class Immunization extends DomainResource {
for (Identifier i : identifier)
dst.identifier.add(i.copy());
};
dst.status = status == null ? null : status.copy();
dst.date = date == null ? null : date.copy();
dst.vaccineType = vaccineType == null ? null : vaccineType.copy();
dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy();
dst.patient = patient == null ? null : patient.copy();
dst.wasNotGiven = wasNotGiven == null ? null : wasNotGiven.copy();
dst.reported = reported == null ? null : reported.copy();
@ -1832,6 +1957,11 @@ public class Immunization extends DomainResource {
dst.site = site == null ? null : site.copy();
dst.route = route == null ? null : route.copy();
dst.doseQuantity = doseQuantity == null ? null : doseQuantity.copy();
if (note != null) {
dst.note = new ArrayList<Annotation>();
for (Annotation i : note)
dst.note.add(i.copy());
};
dst.explanation = explanation == null ? null : explanation.copy();
if (reaction != null) {
dst.reaction = new ArrayList<ImmunizationReactionComponent>();
@ -1857,14 +1987,14 @@ public class Immunization extends DomainResource {
if (!(other instanceof Immunization))
return false;
Immunization o = (Immunization) other;
return compareDeep(identifier, o.identifier, true) && compareDeep(date, o.date, true) && compareDeep(vaccineType, o.vaccineType, true)
&& compareDeep(patient, o.patient, true) && compareDeep(wasNotGiven, o.wasNotGiven, true) && compareDeep(reported, o.reported, true)
&& compareDeep(performer, o.performer, true) && compareDeep(requester, o.requester, true) && compareDeep(encounter, o.encounter, true)
&& compareDeep(manufacturer, o.manufacturer, true) && compareDeep(location, o.location, true) && compareDeep(lotNumber, o.lotNumber, true)
&& compareDeep(expirationDate, o.expirationDate, true) && compareDeep(site, o.site, true) && compareDeep(route, o.route, true)
&& compareDeep(doseQuantity, o.doseQuantity, true) && compareDeep(explanation, o.explanation, true)
&& compareDeep(reaction, o.reaction, true) && compareDeep(vaccinationProtocol, o.vaccinationProtocol, true)
;
return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(date, o.date, true)
&& compareDeep(vaccineCode, o.vaccineCode, true) && compareDeep(patient, o.patient, true) && compareDeep(wasNotGiven, o.wasNotGiven, true)
&& compareDeep(reported, o.reported, true) && compareDeep(performer, o.performer, true) && compareDeep(requester, o.requester, true)
&& compareDeep(encounter, o.encounter, true) && compareDeep(manufacturer, o.manufacturer, true)
&& compareDeep(location, o.location, true) && compareDeep(lotNumber, o.lotNumber, true) && compareDeep(expirationDate, o.expirationDate, true)
&& compareDeep(site, o.site, true) && compareDeep(route, o.route, true) && compareDeep(doseQuantity, o.doseQuantity, true)
&& compareDeep(note, o.note, true) && compareDeep(explanation, o.explanation, true) && compareDeep(reaction, o.reaction, true)
&& compareDeep(vaccinationProtocol, o.vaccinationProtocol, true);
}
@Override
@ -1874,21 +2004,21 @@ public class Immunization extends DomainResource {
if (!(other instanceof Immunization))
return false;
Immunization o = (Immunization) other;
return compareValues(date, o.date, true) && compareValues(wasNotGiven, o.wasNotGiven, true) && compareValues(reported, o.reported, true)
&& compareValues(lotNumber, o.lotNumber, true) && compareValues(expirationDate, o.expirationDate, true)
return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(wasNotGiven, o.wasNotGiven, true)
&& compareValues(reported, o.reported, true) && compareValues(lotNumber, o.lotNumber, true) && compareValues(expirationDate, o.expirationDate, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (date == null || date.isEmpty())
&& (vaccineType == null || vaccineType.isEmpty()) && (patient == null || patient.isEmpty())
return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty())
&& (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty()) && (patient == null || patient.isEmpty())
&& (wasNotGiven == null || wasNotGiven.isEmpty()) && (reported == null || reported.isEmpty())
&& (performer == null || performer.isEmpty()) && (requester == null || requester.isEmpty())
&& (encounter == null || encounter.isEmpty()) && (manufacturer == null || manufacturer.isEmpty())
&& (location == null || location.isEmpty()) && (lotNumber == null || lotNumber.isEmpty())
&& (expirationDate == null || expirationDate.isEmpty()) && (site == null || site.isEmpty())
&& (route == null || route.isEmpty()) && (doseQuantity == null || doseQuantity.isEmpty())
&& (explanation == null || explanation.isEmpty()) && (reaction == null || reaction.isEmpty())
&& (note == null || note.isEmpty()) && (explanation == null || explanation.isEmpty()) && (reaction == null || reaction.isEmpty())
&& (vaccinationProtocol == null || vaccinationProtocol.isEmpty());
}
@ -1911,10 +2041,6 @@ public class Immunization extends DomainResource {
public static final String SP_REACTION = "reaction";
@SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number", type="string" )
public static final String SP_LOTNUMBER = "lot-number";
@SearchParamDefinition(name="subject", path="Immunization.patient", description="The patient for the vaccination record", type="reference" )
public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="vaccine-type", path="Immunization.vaccineType", description="Vaccine Product Type Administered", type="token" )
public static final String SP_VACCINETYPE = "vaccine-type";
@SearchParamDefinition(name="notgiven", path="Immunization.wasNotGiven", description="Administrations which were not given", type="token" )
public static final String SP_NOTGIVEN = "notgiven";
@SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer", type="reference" )
@ -1923,12 +2049,16 @@ public class Immunization extends DomainResource {
public static final String SP_DOSESEQUENCE = "dose-sequence";
@SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="vaccine-code", path="Immunization.vaccineCode", description="Vaccine Product Administered", type="token" )
public static final String SP_VACCINECODE = "vaccine-code";
@SearchParamDefinition(name="reason-not-given", path="Immunization.explanation.reasonNotGiven", description="Explanation of reason vaccination was not administered", type="token" )
public static final String SP_REASONNOTGIVEN = "reason-not-given";
@SearchParamDefinition(name="location", path="Immunization.location", description="The service delivery location or facility in which the vaccine was / was to be administered", type="reference" )
public static final String SP_LOCATION = "location";
@SearchParamDefinition(name="reaction-date", path="Immunization.reaction.date", description="When did reaction start?", type="date" )
public static final String SP_REACTIONDATE = "reaction-date";
@SearchParamDefinition(name="status", path="Immunization.status", description="Immunization event status", type="token" )
public static final String SP_STATUS = "status";
}

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.Description;
import org.hl7.fhir.instance.model.annotations.Block;
import org.hl7.fhir.instance.model.api.*;
/**
* A patient's point-of-time immunization status and recommendation with optional supporting justification.
* A patients point-in-time immunization and recommendation (i.e. forecasting a patients immunization eligibility according to a published schedule) with optional supporting justification.
*/
@ResourceDef(name="ImmunizationRecommendation", profile="http://hl7.org/fhir/Profile/ImmunizationRecommendation")
public class ImmunizationRecommendation extends DomainResource {
@ -58,9 +58,9 @@ public class ImmunizationRecommendation extends DomainResource {
/**
* Vaccine that pertains to the recommendation.
*/
@Child(name = "vaccineType", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Child(name = "vaccineCode", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Vaccine recommendation applies to", formalDefinition="Vaccine that pertains to the recommendation." )
protected CodeableConcept vaccineType;
protected CodeableConcept vaccineCode;
/**
* This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).
@ -79,21 +79,21 @@ public class ImmunizationRecommendation extends DomainResource {
/**
* Vaccine date recommendations - e.g. earliest date to administer, latest date to administer, etc.
*/
@Child(name = "dateCriterion", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "dateCriterion", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Dates governing proposed immunization", formalDefinition="Vaccine date recommendations - e.g. earliest date to administer, latest date to administer, etc." )
protected List<ImmunizationRecommendationRecommendationDateCriterionComponent> dateCriterion;
/**
* Contains information about the protocol under which the vaccine was administered.
*/
@Child(name = "protocol", type = {}, order=6, min=0, max=1, modifier=false, summary=true)
@Child(name = "protocol", type = {}, order=6, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Protocol used by recommendation", formalDefinition="Contains information about the protocol under which the vaccine was administered." )
protected ImmunizationRecommendationRecommendationProtocolComponent protocol;
/**
* Immunization event history that supports the status and recommendation.
*/
@Child(name = "supportingImmunization", type = {Immunization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "supportingImmunization", type = {Immunization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Past immunizations supporting recommendation", formalDefinition="Immunization event history that supports the status and recommendation." )
protected List<Reference> supportingImmunization;
/**
@ -105,7 +105,7 @@ public class ImmunizationRecommendation extends DomainResource {
/**
* Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.
*/
@Child(name = "supportingPatientInformation", type = {Observation.class, AllergyIntolerance.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Child(name = "supportingPatientInformation", type = {Observation.class, AllergyIntolerance.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Patient observations supporting recommendation", formalDefinition="Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information." )
protected List<Reference> supportingPatientInformation;
/**
@ -114,7 +114,7 @@ public class ImmunizationRecommendation extends DomainResource {
protected List<Resource> supportingPatientInformationTarget;
private static final long serialVersionUID = 366360557L;
private static final long serialVersionUID = 1501347482L;
/*
* Constructor
@ -126,10 +126,10 @@ public class ImmunizationRecommendation extends DomainResource {
/*
* Constructor
*/
public ImmunizationRecommendationRecommendationComponent(DateTimeType date, CodeableConcept vaccineType, CodeableConcept forecastStatus) {
public ImmunizationRecommendationRecommendationComponent(DateTimeType date, CodeableConcept vaccineCode, CodeableConcept forecastStatus) {
super();
this.date = date;
this.vaccineType = vaccineType;
this.vaccineCode = vaccineCode;
this.forecastStatus = forecastStatus;
}
@ -179,26 +179,26 @@ public class ImmunizationRecommendation extends DomainResource {
}
/**
* @return {@link #vaccineType} (Vaccine that pertains to the recommendation.)
* @return {@link #vaccineCode} (Vaccine that pertains to the recommendation.)
*/
public CodeableConcept getVaccineType() {
if (this.vaccineType == null)
public CodeableConcept getVaccineCode() {
if (this.vaccineCode == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.vaccineType");
throw new Error("Attempt to auto-create ImmunizationRecommendationRecommendationComponent.vaccineCode");
else if (Configuration.doAutoCreate())
this.vaccineType = new CodeableConcept(); // cc
return this.vaccineType;
this.vaccineCode = new CodeableConcept(); // cc
return this.vaccineCode;
}
public boolean hasVaccineType() {
return this.vaccineType != null && !this.vaccineType.isEmpty();
public boolean hasVaccineCode() {
return this.vaccineCode != null && !this.vaccineCode.isEmpty();
}
/**
* @param value {@link #vaccineType} (Vaccine that pertains to the recommendation.)
* @param value {@link #vaccineCode} (Vaccine that pertains to the recommendation.)
*/
public ImmunizationRecommendationRecommendationComponent setVaccineType(CodeableConcept value) {
this.vaccineType = value;
public ImmunizationRecommendationRecommendationComponent setVaccineCode(CodeableConcept value) {
this.vaccineCode = value;
return this;
}
@ -448,7 +448,7 @@ public class ImmunizationRecommendation extends DomainResource {
protected void listChildren(List<Property> childrenList) {
super.listChildren(childrenList);
childrenList.add(new Property("date", "dateTime", "The date the immunization recommendation was created.", 0, java.lang.Integer.MAX_VALUE, date));
childrenList.add(new Property("vaccineType", "CodeableConcept", "Vaccine that pertains to the recommendation.", 0, java.lang.Integer.MAX_VALUE, vaccineType));
childrenList.add(new Property("vaccineCode", "CodeableConcept", "Vaccine that pertains to the recommendation.", 0, java.lang.Integer.MAX_VALUE, vaccineCode));
childrenList.add(new Property("doseNumber", "positiveInt", "This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).", 0, java.lang.Integer.MAX_VALUE, doseNumber));
childrenList.add(new Property("forecastStatus", "CodeableConcept", "Vaccine administration status.", 0, java.lang.Integer.MAX_VALUE, forecastStatus));
childrenList.add(new Property("dateCriterion", "", "Vaccine date recommendations - e.g. earliest date to administer, latest date to administer, etc.", 0, java.lang.Integer.MAX_VALUE, dateCriterion));
@ -461,7 +461,7 @@ public class ImmunizationRecommendation extends DomainResource {
ImmunizationRecommendationRecommendationComponent dst = new ImmunizationRecommendationRecommendationComponent();
copyValues(dst);
dst.date = date == null ? null : date.copy();
dst.vaccineType = vaccineType == null ? null : vaccineType.copy();
dst.vaccineCode = vaccineCode == null ? null : vaccineCode.copy();
dst.doseNumber = doseNumber == null ? null : doseNumber.copy();
dst.forecastStatus = forecastStatus == null ? null : forecastStatus.copy();
if (dateCriterion != null) {
@ -490,7 +490,7 @@ public class ImmunizationRecommendation extends DomainResource {
if (!(other instanceof ImmunizationRecommendationRecommendationComponent))
return false;
ImmunizationRecommendationRecommendationComponent o = (ImmunizationRecommendationRecommendationComponent) other;
return compareDeep(date, o.date, true) && compareDeep(vaccineType, o.vaccineType, true) && compareDeep(doseNumber, o.doseNumber, true)
return compareDeep(date, o.date, true) && compareDeep(vaccineCode, o.vaccineCode, true) && compareDeep(doseNumber, o.doseNumber, true)
&& compareDeep(forecastStatus, o.forecastStatus, true) && compareDeep(dateCriterion, o.dateCriterion, true)
&& compareDeep(protocol, o.protocol, true) && compareDeep(supportingImmunization, o.supportingImmunization, true)
&& compareDeep(supportingPatientInformation, o.supportingPatientInformation, true);
@ -507,7 +507,7 @@ public class ImmunizationRecommendation extends DomainResource {
}
public boolean isEmpty() {
return super.isEmpty() && (date == null || date.isEmpty()) && (vaccineType == null || vaccineType.isEmpty())
return super.isEmpty() && (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty())
&& (doseNumber == null || doseNumber.isEmpty()) && (forecastStatus == null || forecastStatus.isEmpty())
&& (dateCriterion == null || dateCriterion.isEmpty()) && (protocol == null || protocol.isEmpty())
&& (supportingImmunization == null || supportingImmunization.isEmpty()) && (supportingPatientInformation == null || supportingPatientInformation.isEmpty())
@ -521,14 +521,14 @@ public class ImmunizationRecommendation extends DomainResource {
/**
* Date classification of recommendation - e.g. earliest date to give, latest date to give, etc.
*/
@Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Type of date", formalDefinition="Date classification of recommendation - e.g. earliest date to give, latest date to give, etc." )
protected CodeableConcept code;
/**
* Date recommendation.
*/
@Child(name = "value", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Child(name = "value", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Recommended date", formalDefinition="Date recommendation." )
protected DateTimeType value;
@ -665,21 +665,21 @@ public class ImmunizationRecommendation extends DomainResource {
/**
* Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.
*/
@Child(name = "doseSequence", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Child(name = "doseSequence", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Number of dose within sequence", formalDefinition="Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol." )
protected IntegerType doseSequence;
/**
* Contains the description about the protocol under which the vaccine was administered.
*/
@Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Protocol details", formalDefinition="Contains the description about the protocol under which the vaccine was administered." )
protected StringType description;
/**
* Indicates the authority who published the protocol? E.g. ACIP.
*/
@Child(name = "authority", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Child(name = "authority", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Who is responsible for protocol", formalDefinition="Indicates the authority who published the protocol? E.g. ACIP." )
protected Reference authority;
@ -691,7 +691,7 @@ public class ImmunizationRecommendation extends DomainResource {
/**
* One possible path to achieve presumed immunity against a disease - within the context of an authority.
*/
@Child(name = "series", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
@Child(name = "series", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Name of vaccination series", formalDefinition="One possible path to achieve presumed immunity against a disease - within the context of an authority." )
protected StringType series;
@ -1168,13 +1168,11 @@ public class ImmunizationRecommendation extends DomainResource {
public static final String SP_DATE = "date";
@SearchParamDefinition(name="identifier", path="ImmunizationRecommendation.identifier", description="Business identifier", type="token" )
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="Number of dose within sequence", type="token" )
@SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="Number of dose within sequence", type="number" )
public static final String SP_DOSESEQUENCE = "dose-sequence";
@SearchParamDefinition(name="subject", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" )
public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="vaccine-type", path="ImmunizationRecommendation.recommendation.vaccineType", description="Vaccine recommendation applies to", type="token" )
@SearchParamDefinition(name="vaccine-type", path="ImmunizationRecommendation.recommendation.vaccineCode", description="Vaccine recommendation applies to", type="token" )
public static final String SP_VACCINETYPE = "vaccine-type";
@SearchParamDefinition(name="dose-number", path="ImmunizationRecommendation.recommendation.doseNumber", description="Recommended dose number", type="number" )
public static final String SP_DOSENUMBER = "dose-number";

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model;
*/
// Generated on Thu, Aug 27, 2015 19:45-0400 for FHIR v0.5.0
// Generated on Tue, Sep 1, 2015 19:08-0400 for FHIR v1.0.0
import java.util.*;
@ -2067,10 +2067,10 @@ public class ImplementationGuide extends DomainResource {
protected StringType copyright;
/**
* The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.
* The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.0 for this version.
*/
@Child(name = "fhirVersion", type = {IdType.class}, order=11, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="FHIR Version this Implementation Guide targets", formalDefinition="The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version." )
@Description(shortDefinition="FHIR Version this Implementation Guide targets", formalDefinition="The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.0 for this version." )
protected IdType fhirVersion;
/**
@ -2634,7 +2634,7 @@ public class ImplementationGuide extends DomainResource {
}
/**
* @return {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
* @return {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
*/
public IdType getFhirVersionElement() {
if (this.fhirVersion == null)
@ -2654,7 +2654,7 @@ public class ImplementationGuide extends DomainResource {
}
/**
* @param value {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
* @param value {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value
*/
public ImplementationGuide setFhirVersionElement(IdType value) {
this.fhirVersion = value;
@ -2662,14 +2662,14 @@ public class ImplementationGuide extends DomainResource {
}
/**
* @return The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.
* @return The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.0 for this version.
*/
public String getFhirVersion() {
return this.fhirVersion == null ? null : this.fhirVersion.getValue();
}
/**
* @param value The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.
* @param value The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.0 for this version.
*/
public ImplementationGuide setFhirVersion(String value) {
if (Utilities.noString(value))
@ -2893,7 +2893,7 @@ public class ImplementationGuide extends DomainResource {
childrenList.add(new Property("description", "string", "A free text natural language description of the Implementation Guide and its use.", 0, java.lang.Integer.MAX_VALUE, description));
childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdication for which this implementation guide was defined.", 0, java.lang.Integer.MAX_VALUE, useContext));
childrenList.add(new Property("copyright", "string", "A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright));
childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion));
childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion));
childrenList.add(new Property("dependency", "", "Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc defined in other implementation guides.", 0, java.lang.Integer.MAX_VALUE, dependency));
childrenList.add(new Property("package", "", "A logial group of resources. Logical groups can be used when building pages.", 0, java.lang.Integer.MAX_VALUE, package_));
childrenList.add(new Property("global", "", "A set of profiles that all resources covered by this implementation guide must conform to.", 0, java.lang.Integer.MAX_VALUE, global));

Some files were not shown because too many files have changed in this diff Show More