diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml
index d61cc8b27..31b26d183 100644
--- a/org.hl7.fhir.convertors/pom.xml
+++ b/org.hl7.fhir.convertors/pom.xml
@@ -66,6 +66,19 @@
true
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit_jupiter_version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ ${junit_jupiter_version}
+ test
+
diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType10_50Test.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType10_50Test.java
index bb913ad40..cf756616a 100644
--- a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType10_50Test.java
+++ b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType10_50Test.java
@@ -1,6 +1,22 @@
package org.hl7.fhir.convertors;
-import org.hl7.fhir.dstu2.model.*;
+import org.hl7.fhir.dstu2.model.Base64BinaryType;
+import org.hl7.fhir.dstu2.model.BooleanType;
+import org.hl7.fhir.dstu2.model.CodeType;
+import org.hl7.fhir.dstu2.model.DateTimeType;
+import org.hl7.fhir.dstu2.model.DateType;
+import org.hl7.fhir.dstu2.model.DecimalType;
+import org.hl7.fhir.dstu2.model.InstantType;
+import org.hl7.fhir.dstu2.model.IntegerType;
+import org.hl7.fhir.dstu2.model.MarkdownType;
+import org.hl7.fhir.dstu2.model.OidType;
+import org.hl7.fhir.dstu2.model.PositiveIntType;
+import org.hl7.fhir.dstu2.model.PrimitiveType;
+import org.hl7.fhir.dstu2.model.StringType;
+import org.hl7.fhir.dstu2.model.TimeType;
+import org.hl7.fhir.dstu2.model.UnsignedIntType;
+import org.hl7.fhir.dstu2.model.UriType;
+import org.hl7.fhir.dstu2.model.UuidType;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -8,10 +24,7 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import junit.framework.Assert;
-
import java.io.IOException;
-import java.io.InputStream;
import java.util.stream.Stream;
public class VersionConvertorPrimitiveType10_50Test {
@@ -22,10 +35,10 @@ public class VersionConvertorPrimitiveType10_50Test {
public void testAuditEvent() throws FHIRFormatError, IOException {
org.hl7.fhir.dstu2.model.AuditEvent ae2 = (org.hl7.fhir.dstu2.model.AuditEvent) new org.hl7.fhir.dstu2.formats.JsonParser().parse(AUDIT_EVENT_SOURCE);
org.hl7.fhir.r5.model.AuditEvent ae5 = (org.hl7.fhir.r5.model.AuditEvent) VersionConvertor_10_50.convertResource(ae2);
- Assert.assertEquals(ae5.getId(), ae2.getId());
+ Assertions.assertEquals(ae5.getId(), ae2.getId());
}
-
-
+
+
@ParameterizedTest(name = "Testing dstu2 -> r5 conversion of null value {0}.")
@MethodSource("dstu2PrimitiveTypes")
public void testNullValueDstu2Primitive(String classname, T obj) {
diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_40Test.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_40Test.java
index 58bb89d35..fa24d5176 100644
--- a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_40Test.java
+++ b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_40Test.java
@@ -1,6 +1,22 @@
package org.hl7.fhir.convertors;
-import org.hl7.fhir.dstu3.model.*;
+import org.hl7.fhir.dstu3.model.Base64BinaryType;
+import org.hl7.fhir.dstu3.model.BooleanType;
+import org.hl7.fhir.dstu3.model.CodeType;
+import org.hl7.fhir.dstu3.model.DateTimeType;
+import org.hl7.fhir.dstu3.model.DateType;
+import org.hl7.fhir.dstu3.model.DecimalType;
+import org.hl7.fhir.dstu3.model.InstantType;
+import org.hl7.fhir.dstu3.model.IntegerType;
+import org.hl7.fhir.dstu3.model.MarkdownType;
+import org.hl7.fhir.dstu3.model.OidType;
+import org.hl7.fhir.dstu3.model.PositiveIntType;
+import org.hl7.fhir.dstu3.model.PrimitiveType;
+import org.hl7.fhir.dstu3.model.StringType;
+import org.hl7.fhir.dstu3.model.TimeType;
+import org.hl7.fhir.dstu3.model.UnsignedIntType;
+import org.hl7.fhir.dstu3.model.UriType;
+import org.hl7.fhir.dstu3.model.UuidType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_50Test.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_50Test.java
index 576574d6a..d93e3d641 100644
--- a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_50Test.java
+++ b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType30_50Test.java
@@ -1,6 +1,22 @@
package org.hl7.fhir.convertors;
-import org.hl7.fhir.dstu3.model.*;
+import org.hl7.fhir.dstu3.model.Base64BinaryType;
+import org.hl7.fhir.dstu3.model.BooleanType;
+import org.hl7.fhir.dstu3.model.CodeType;
+import org.hl7.fhir.dstu3.model.DateTimeType;
+import org.hl7.fhir.dstu3.model.DateType;
+import org.hl7.fhir.dstu3.model.DecimalType;
+import org.hl7.fhir.dstu3.model.InstantType;
+import org.hl7.fhir.dstu3.model.IntegerType;
+import org.hl7.fhir.dstu3.model.MarkdownType;
+import org.hl7.fhir.dstu3.model.OidType;
+import org.hl7.fhir.dstu3.model.PositiveIntType;
+import org.hl7.fhir.dstu3.model.PrimitiveType;
+import org.hl7.fhir.dstu3.model.StringType;
+import org.hl7.fhir.dstu3.model.TimeType;
+import org.hl7.fhir.dstu3.model.UnsignedIntType;
+import org.hl7.fhir.dstu3.model.UriType;
+import org.hl7.fhir.dstu3.model.UuidType;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -8,10 +24,7 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import junit.framework.Assert;
-
import java.io.IOException;
-import java.io.InputStream;
import java.util.stream.Stream;
public class VersionConvertorPrimitiveType30_50Test {
@@ -22,9 +35,9 @@ public class VersionConvertorPrimitiveType30_50Test {
public void testAuditEvent() throws FHIRFormatError, IOException {
org.hl7.fhir.dstu3.model.AuditEvent ae3 = (org.hl7.fhir.dstu3.model.AuditEvent) new org.hl7.fhir.dstu3.formats.JsonParser().parse(AUDIT_EVENT_SOURCE);
org.hl7.fhir.r5.model.AuditEvent ae5 = (org.hl7.fhir.r5.model.AuditEvent) VersionConvertor_30_50.convertResource(ae3, false);
- Assert.assertEquals(ae5.getId(), ae3.getId());
+ Assertions.assertEquals(ae5.getId(), ae3.getId());
}
-
+
@ParameterizedTest(name = "Testing dstu3 -> r5 conversion of null value {0}.")
@MethodSource("dstu3PrimitiveTypes")
public void testNullValueDstu2Primitive(String classname, T obj) {
diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType40_50Test.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType40_50Test.java
index 5e661c75d..98a80c086 100644
--- a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType40_50Test.java
+++ b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/VersionConvertorPrimitiveType40_50Test.java
@@ -1,17 +1,30 @@
package org.hl7.fhir.convertors;
import org.hl7.fhir.exceptions.FHIRFormatError;
-import org.hl7.fhir.r4.model.*;
+import org.hl7.fhir.r4.model.Base64BinaryType;
+import org.hl7.fhir.r4.model.BooleanType;
+import org.hl7.fhir.r4.model.CodeType;
+import org.hl7.fhir.r4.model.DateTimeType;
+import org.hl7.fhir.r4.model.DateType;
+import org.hl7.fhir.r4.model.DecimalType;
+import org.hl7.fhir.r4.model.InstantType;
+import org.hl7.fhir.r4.model.IntegerType;
+import org.hl7.fhir.r4.model.MarkdownType;
+import org.hl7.fhir.r4.model.OidType;
+import org.hl7.fhir.r4.model.PositiveIntType;
+import org.hl7.fhir.r4.model.PrimitiveType;
+import org.hl7.fhir.r4.model.StringType;
+import org.hl7.fhir.r4.model.TimeType;
+import org.hl7.fhir.r4.model.UnsignedIntType;
+import org.hl7.fhir.r4.model.UriType;
+import org.hl7.fhir.r4.model.UuidType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import junit.framework.Assert;
-
import java.io.IOException;
-import java.io.InputStream;
import java.util.stream.Stream;
public class VersionConvertorPrimitiveType40_50Test {
@@ -22,10 +35,10 @@ public class VersionConvertorPrimitiveType40_50Test {
public void testAuditEvent() throws FHIRFormatError, IOException {
org.hl7.fhir.r4.model.AuditEvent ae4 = (org.hl7.fhir.r4.model.AuditEvent) new org.hl7.fhir.r4.formats.JsonParser().parse(AUDIT_EVENT_SOURCE);
org.hl7.fhir.r5.model.AuditEvent ae5 = (org.hl7.fhir.r5.model.AuditEvent) VersionConvertor_40_50.convertResource(ae4);
- Assert.assertEquals(ae5.getId(), ae4.getId());
+ Assertions.assertEquals(ae5.getId(), ae4.getId());
}
-
-
+
+
@ParameterizedTest(name = "Testing r4 -> r5 conversion of null value {0}.")
@MethodSource("r4PrimitiveTypes")
public void testNullValueDstu2Primitive(String classname, T obj) {
diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml
index 58ce94f6c..d49269459 100644
--- a/org.hl7.fhir.dstu2/pom.xml
+++ b/org.hl7.fhir.dstu2/pom.xml
@@ -95,6 +95,20 @@
Saxon-HE
test
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit_jupiter_version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ ${junit_jupiter_version}
+ test
+
diff --git a/org.hl7.fhir.dstu2/src/test/java/org/hl7/fhir/dstu2/test/MetaTest.java b/org.hl7.fhir.dstu2/src/test/java/org/hl7/fhir/dstu2/test/MetaTest.java
index 6ded2d99c..75f0e391c 100644
--- a/org.hl7.fhir.dstu2/src/test/java/org/hl7/fhir/dstu2/test/MetaTest.java
+++ b/org.hl7.fhir.dstu2/src/test/java/org/hl7/fhir/dstu2/test/MetaTest.java
@@ -2,9 +2,8 @@ package org.hl7.fhir.dstu2.test;
import org.hl7.fhir.dstu2.model.Coding;
import org.hl7.fhir.dstu2.model.Meta;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
public class MetaTest {
public static String TEST_SYSTEM = "TEST_SYSTEM";
@@ -14,11 +13,11 @@ public class MetaTest {
public void testMetaSecurity() {
Meta meta = new Meta();
Coding coding = meta.addSecurity().setSystem(TEST_SYSTEM).setCode(TEST_CODE);
- assertTrue(meta.hasSecurity());
- assertNotNull(meta.getSecurity());
- assertNotNull(meta.getSecurity(TEST_SYSTEM, TEST_CODE));
- assertEquals(1, meta.getSecurity().size());
- assertEquals(meta.getSecurity().get(0), meta.getSecurity(TEST_SYSTEM, TEST_CODE));
- assertEquals(coding, meta.getSecurity(TEST_SYSTEM, TEST_CODE));
+ Assertions.assertTrue(meta.hasSecurity());
+ Assertions.assertNotNull(meta.getSecurity());
+ Assertions.assertNotNull(meta.getSecurity(TEST_SYSTEM, TEST_CODE));
+ Assertions.assertEquals(1, meta.getSecurity().size());
+ Assertions.assertEquals(meta.getSecurity().get(0), meta.getSecurity(TEST_SYSTEM, TEST_CODE));
+ Assertions.assertEquals(coding, meta.getSecurity(TEST_SYSTEM, TEST_CODE));
}
}
diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml
index a4cd6c59b..c4c1378fe 100644
--- a/org.hl7.fhir.dstu2016may/pom.xml
+++ b/org.hl7.fhir.dstu2016may/pom.xml
@@ -109,6 +109,20 @@
Saxon-HE
test
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit_jupiter_version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ ${junit_jupiter_version}
+ test
+
diff --git a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/BaseDateTimeTypeTest.java b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/BaseDateTimeTypeTest.java
index 9a6670ca9..ecc92c6e5 100644
--- a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/BaseDateTimeTypeTest.java
+++ b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/BaseDateTimeTypeTest.java
@@ -3,8 +3,8 @@ package org.hl7.fhir.dstu2016may.test;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import org.hl7.fhir.dstu2016may.model.DateType;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@@ -16,7 +16,7 @@ import static org.junit.Assert.assertEquals;
public class BaseDateTimeTypeTest {
private SimpleDateFormat myDateInstantParser;
- @Before
+ @BeforeEach
public void before() {
myDateInstantParser = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
}
@@ -52,6 +52,4 @@ public class BaseDateTimeTypeTest {
date.setValue(time);
assertEquals("2012-01-02", date.getValueAsString());
}
-
-
}
diff --git a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/FluentPathTests.java b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/FluentPathTests.java
index 536069aca..093951fc3 100644
--- a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/FluentPathTests.java
+++ b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/FluentPathTests.java
@@ -1,10 +1,5 @@
package org.hl7.fhir.dstu2016may.test;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.List;
-
import org.hl7.fhir.dstu2016may.formats.JsonParser;
import org.hl7.fhir.dstu2016may.model.Appointment;
import org.hl7.fhir.dstu2016may.model.Base;
@@ -30,11 +25,15 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
-
-import junit.framework.Assert;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.List;
+
@Disabled
public class FluentPathTests {
@@ -77,7 +76,7 @@ public class FluentPathTests {
@SuppressWarnings("deprecation")
private void test(Resource resource, String expression, int count, String... types) throws FileNotFoundException, IOException, FHIRException {
if (TestingUtilities.context == null)
- TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
+ TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
FHIRPathEngine fp = new FHIRPathEngine(TestingUtilities.context);
ExpressionNode node = fp.parse(expression);
@@ -86,7 +85,7 @@ public class FluentPathTests {
if (fp.hasLog())
System.out.println(fp.takeLog());
- Assert.assertTrue(String.format("Expected %d objects but found %d", count, outcome.size()), outcome.size() == count);
+ Assertions.assertTrue(outcome.size() == count, String.format("Expected %d objects but found %d", count, outcome.size()));
CommaSeparatedStringBuilder msg = new CommaSeparatedStringBuilder();
for (String t : types)
msg.append(t);
@@ -94,16 +93,16 @@ public class FluentPathTests {
boolean found = false;
String type = b.fhirType();
for (String t : types)
- if (type.equals(t))
+ if (type.equals(t))
found = true;
- Assert.assertTrue(String.format("Object type %s not ok from %s", type, msg), found);
+ Assertions.assertTrue(found, String.format("Object type %s not ok from %s", type, msg));
}
}
@SuppressWarnings("deprecation")
private void testBoolean(Resource resource, String expression, boolean value) throws FileNotFoundException, IOException, FHIRException {
if (TestingUtilities.context == null)
- TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
+ TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
FHIRPathEngine fp = new FHIRPathEngine(TestingUtilities.context);
ExpressionNode node = fp.parse(expression);
@@ -112,13 +111,13 @@ public class FluentPathTests {
if (fp.hasLog())
System.out.println(fp.takeLog());
- Assert.assertTrue("Wrong answer", fp.convertToBoolean(outcome) == value);
+ Assertions.assertEquals(fp.convertToBoolean(outcome), value, "Wrong answer");
}
@SuppressWarnings("deprecation")
private void testBoolean(Resource resource, Base focus, String focusType, String expression, boolean value) throws FileNotFoundException, IOException, FHIRException {
if (TestingUtilities.context == null)
- TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
+ TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
FHIRPathEngine fp = new FHIRPathEngine(TestingUtilities.context);
ExpressionNode node = fp.parse(expression);
@@ -127,12 +126,12 @@ public class FluentPathTests {
if (fp.hasLog())
System.out.println(fp.takeLog());
- Assert.assertTrue("Wrong answer", fp.convertToBoolean(outcome) == value);
+ Assertions.assertEquals(fp.convertToBoolean(outcome), value, "Wrong answer");
}
private void testWrong(Resource resource, String expression) throws FileNotFoundException, IOException, FHIRException {
if (TestingUtilities.context == null)
- TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
+ TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip");
FHIRPathEngine fp = new FHIRPathEngine(TestingUtilities.context);
try {
@@ -141,7 +140,7 @@ public class FluentPathTests {
fp.evaluate(null, null, resource, node);
if (fp.hasLog())
System.out.println(fp.takeLog());
- Assert.assertTrue("Fail expected", false);
+ Assertions.fail("Fail expected");
} catch (PathEngineException e) {
// ok
}
@@ -713,7 +712,7 @@ public class FluentPathTests {
testBoolean(patient(), "(1 | 2 | 3).count() = 3", true);
testBoolean(patient(), "(1 | 2 | 2).count() = 2", true); // merge duplicates
}
-
+
@Test
public void testIn() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1 in (1 | 2 | 3)", true);
@@ -735,7 +734,7 @@ public class FluentPathTests {
testBoolean(patient(), "(true and true) = true", true);
testBoolean(patient(), "(true and false) = false", true);
testBoolean(patient(), "(true and {}) = {}", true);
-
+
testBoolean(patient(), "(false and true) = false", true);
testBoolean(patient(), "(false and false) = false", true);
testBoolean(patient(), "(false and {}) = false", true);
@@ -750,7 +749,7 @@ public class FluentPathTests {
testBoolean(patient(), "(true or true) = true", true);
testBoolean(patient(), "(true or false) = true", true);
testBoolean(patient(), "(true or {}) = true", true);
-
+
testBoolean(patient(), "(false or true) = true", true);
testBoolean(patient(), "(false or false) = false", true);
testBoolean(patient(), "(false or {}) = {}", true);
@@ -765,7 +764,7 @@ public class FluentPathTests {
testBoolean(patient(), "(true xor true) = false", true);
testBoolean(patient(), "(true xor false) = true", true);
testBoolean(patient(), "(true xor {}) = {}", true);
-
+
testBoolean(patient(), "(false xor true) = true", true);
testBoolean(patient(), "(false xor false) = false", true);
testBoolean(patient(), "(false xor {}) = {}", true);
@@ -774,13 +773,13 @@ public class FluentPathTests {
testBoolean(patient(), "({} xor false) = {}", true);
testBoolean(patient(), "({} xor {}) = {}", true);
}
-
+
@Test
public void testBooleanImplies() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "(true implies true) = true", true);
testBoolean(patient(), "(true implies false) = false", true);
testBoolean(patient(), "(true implies {}) = {}", true);
-
+
testBoolean(patient(), "(false implies true) = true", true);
testBoolean(patient(), "(false implies false) = true", true);
testBoolean(patient(), "(false implies {}) = true", true);
@@ -789,12 +788,12 @@ public class FluentPathTests {
testBoolean(patient(), "({} implies false) = true", true);
testBoolean(patient(), "({} implies {}) = true", true);
}
-
+
@Test
public void testPlus() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1 + 1 = 2", true);
testBoolean(patient(), "1 + 0 = 1", true);
- testBoolean(patient(), "1.2 + 1.8 = 3.0", true);
+ testBoolean(patient(), "1.2 + 1.8 = 3.0", true);
testBoolean(patient(), "'a'+'b' = 'ab'", true);
}
@@ -802,56 +801,56 @@ public class FluentPathTests {
public void testConcatenate() throws FileNotFoundException, IOException, FHIRException {
testBoolean(patient(), "1 & 1 = '11'", true);
testBoolean(patient(), "1 & 'a' = '1a'", true);
- testBoolean(patient(), "{} & 'b' = 'b'", true);
- testBoolean(patient(), "(1 | 2 | 3) & 'b' = '1,2,3b'", true);
+ testBoolean(patient(), "{} & 'b' = 'b'", true);
+ testBoolean(patient(), "(1 | 2 | 3) & 'b' = '1,2,3b'", true);
testBoolean(patient(), "'a'&'b' = 'ab'", true);
}
-
+
@Test
public void testMinus() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1 - 1 = 0", true);
testBoolean(patient(), "1 - 0 = 1", true);
- testBoolean(patient(), "1.8 - 1.2 = 0.6", true);
+ testBoolean(patient(), "1.8 - 1.2 = 0.6", true);
testWrong(patient(), "'a'-'b' = 'ab'");
}
-
+
@Test
public void testMultiply() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1 * 1 = 1", true);
testBoolean(patient(), "1 * 0 = 0", true);
- testBoolean(patient(), "1.2 * 1.8 = 2.16", true);
+ testBoolean(patient(), "1.2 * 1.8 = 2.16", true);
}
-
+
@Test
public void testDivide() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1 / 1 = 1", true);
testBoolean(patient(), "4 / 2 = 2", true);
testBoolean(patient(), "1 / 2 = 0.5", true);
- testBoolean(patient(), "1.2 / 1.8 = 0.67", true);
+ testBoolean(patient(), "1.2 / 1.8 = 0.67", true);
}
-
+
@Test
public void testDiv() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1 div 1 = 1", true);
testBoolean(patient(), "4 div 2 = 2", true);
testBoolean(patient(), "5 div 2 = 2", true);
- testBoolean(patient(), "2.2 div 1.8 = 1", true);
+ testBoolean(patient(), "2.2 div 1.8 = 1", true);
}
-
+
@Test
public void testMod() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1 mod 1 = 0", true);
testBoolean(patient(), "4 mod 2 = 0", true);
testBoolean(patient(), "5 mod 2 = 1", true);
- testBoolean(patient(), "2.2 mod 1.8 = 0.4", true);
+ testBoolean(patient(), "2.2 mod 1.8 = 0.4", true);
}
-
+
@Test
public void testPrecedence() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "1+2*3+4 = 11", true);
}
-
+
@Test
public void testVariables() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "%sct = 'http://snomed.info/sct'", true);
@@ -859,28 +858,28 @@ public class FluentPathTests {
testBoolean(patient(), "%ucum = 'http://unitsofmeasure.org'", true);
testBoolean(patient(), "%\"vs-administrative-gender\" = 'http://hl7.org/fhir/ValueSet/administrative-gender'", true);
}
-
+
@Test
public void testExtension() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), "Patient.birthDate.extension('http://hl7.org/fhir/StructureDefinition/patient-birthTime').exists()", true);
testBoolean(patient(), "Patient.birthDate.extension(%\"ext-patient-birthTime\").exists()", true);
testBoolean(patient(), "Patient.birthDate.extension('http://hl7.org/fhir/StructureDefinition/patient-birthTime1').empty()", true);
}
-
+
@Test
public void testDollarResource() throws FileNotFoundException, FHIRFormatError, IOException, FHIRException {
testBoolean(patient(), patient().getManagingOrganization(), "Reference", "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", true);
testBoolean(patient(), patient(), "Patient", "contained.select(('#'+id in %resource.descendents().reference).not()).empty()", true);
testWrong(patient(), "contained.select(('#'+id in %resource.descendents().reference).not()).empty()");
}
-
+
@Test
public void testTyping() throws FileNotFoundException, IOException, FHIRException {
ElementDefinition ed = new ElementDefinition();
ed.getBinding().setValueSet(new UriType("http://test.org"));
testBoolean(null, ed.getBinding().getValueSet(), "ElementDefinition.binding.valueSetUri", "startsWith('http:') or startsWith('https') or startsWith('urn:')", true);
}
-
+
@Test
public void testDecimalRA() throws FileNotFoundException, IOException, FHIRException {
RiskAssessment r = new RiskAssessment();
@@ -895,20 +894,20 @@ public class FluentPathTests {
sq1.setCode("%");
sq1.setSystem("http://unitsofmeasure.org");
r.addPrediction().setProbability(new Range().setLow(sq).setHigh(sq1));
- testBoolean(r, r.getPrediction().get(0).getProbability(), "RiskAssessment.prediction.probabilityRange",
- "(low.empty() or ((low.code = '%') and (low.system = %ucum))) and (high.empty() or ((high.code = '%') and (high.system = %ucum)))", true);
+ testBoolean(r, r.getPrediction().get(0).getProbability(), "RiskAssessment.prediction.probabilityRange",
+ "(low.empty() or ((low.code = '%') and (low.system = %ucum))) and (high.empty() or ((high.code = '%') and (high.system = %ucum)))", true);
testBoolean(r, r.getPrediction().get(0), "RiskAssessment.prediction", "probability is decimal implies probability.as(decimal) <= 100", true);
r.getPrediction().get(0).setProbability(new DecimalType(80));
testBoolean(r, r.getPrediction().get(0), "RiskAssessment.prediction", "probability.as(decimal) <= 100", true);
}
-
-
+
+
@Test
public void testAppointment() throws FileNotFoundException, IOException, FHIRException {
testBoolean(appointment(), "(start and end) or status = 'proposed' or status = 'cancelled'", true);
testBoolean(appointment(), "start.empty() xor end.exists()", true);
}
-
+
@Test
public void testQuestionnaire() throws FileNotFoundException, IOException, FHIRException {
Questionnaire q = (Questionnaire) new JsonParser().parse(new FileInputStream("C:/work/org.hl7.fhir.2016May/build/publish/questionnaire-example-gcs.json"));
@@ -920,7 +919,7 @@ public class FluentPathTests {
private void testQItem(QuestionnaireItemComponent qi) throws FileNotFoundException, IOException, FHIRException {
testBoolean(null, qi, "Questionnaire.item", "(type = 'choice' or type = 'open-choice') or (options.empty() and option.empty())", true);
}
-
+
@Test
public void testExtensionDefinitions() throws FileNotFoundException, IOException, FHIRException {
Bundle b = (Bundle) new JsonParser().parse(new FileInputStream("C:/work/org.hl7.fhir.2016May/build/publish/extension-definitions.json"));
@@ -930,7 +929,7 @@ public class FluentPathTests {
}
private void testStructureDefinition(StructureDefinition sd) throws FileNotFoundException, IOException, FHIRException {
- testBoolean(sd, sd, "StructureDefinition", "snapshot.element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) and differential.element.tail().all(path.startsWith(%resource.differential.element.first().path&'.'))", true);
+ testBoolean(sd, sd, "StructureDefinition", "snapshot.element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) and differential.element.tail().all(path.startsWith(%resource.differential.element.first().path&'.'))", true);
}
@Test
diff --git a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/MessageTest.java b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/MessageTest.java
index 0fe0f1eec..b58bc8cdd 100644
--- a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/MessageTest.java
+++ b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/MessageTest.java
@@ -10,7 +10,7 @@ import org.hl7.fhir.dstu2016may.formats.JsonParser;
import org.hl7.fhir.dstu2016may.model.Bundle;
import org.hl7.fhir.dstu2016may.model.Resource;
import org.hl7.fhir.exceptions.FHIRException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class MessageTest {
diff --git a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/ParserTests.java b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/ParserTests.java
index 5acba4cfb..12dd09cd3 100644
--- a/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/ParserTests.java
+++ b/org.hl7.fhir.dstu2016may/src/test/java/org/hl7/fhir/dstu2016may/test/ParserTests.java
@@ -12,7 +12,7 @@ import org.hl7.fhir.dstu2016may.model.Resource;
import org.hl7.fhir.dstu2016may.utils.SimpleWorkerContext;
import org.hl7.fhir.utilities.Utilities;
-import junit.framework.Assert;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -38,14 +38,13 @@ public class ParserTests {
}
}
- @SuppressWarnings("deprecation")
private void testRoundTrip(String filename, String name) throws Exception {
System.out.println(name);
Resource r = new org.hl7.fhir.dstu2016may.formats.XmlParser().parse(new FileInputStream(filename));
String fn = makeTempFilename();
new org.hl7.fhir.dstu2016may.formats.XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(fn), r);
String msg = TestingUtilities.checkXMLIsSame(filename, fn);
- Assert.assertTrue(name+": "+msg, msg == null);
+ Assertions.assertNull(msg, name + ": " + msg);
String j1 = makeTempFilename();
new org.hl7.fhir.dstu2016may.formats.JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(j1), r);
@@ -57,12 +56,12 @@ public class ParserTests {
fn = makeTempFilename();
Manager.compose(TestingUtilities.context, re, new FileOutputStream(fn), FhirFormat.XML, OutputStyle.PRETTY, null);
msg = TestingUtilities.checkXMLIsSame(filename, fn);
- Assert.assertTrue(name+": "+msg, msg == null);
+ Assertions.assertNull(msg, name + ": " + msg);
String j2 = makeTempFilename();
Manager.compose(TestingUtilities.context, re, new FileOutputStream(j2), FhirFormat.JSON, OutputStyle.PRETTY, null);
msg = TestingUtilities.checkJsonIsSame(j1, j2);
- Assert.assertTrue(name+": "+msg, msg == null);
+ Assertions.assertNull(msg, name + ": " + msg);
// ok, we've produced equivalent JSON by both methods.
// now, we're going to reverse the process
@@ -70,7 +69,7 @@ public class ParserTests {
fn = makeTempFilename();
new org.hl7.fhir.dstu2016may.formats.JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(fn), r);
msg = TestingUtilities.checkJsonIsSame(j2, fn);
- Assert.assertTrue(name+": "+msg, msg == null);
+ Assertions.assertNull(msg, name + ": " + msg);
String x1 = makeTempFilename();
new org.hl7.fhir.dstu2016may.formats.XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(x1), r);
@@ -78,14 +77,14 @@ public class ParserTests {
fn = makeTempFilename();
Manager.compose(TestingUtilities.context, re, new FileOutputStream(fn), FhirFormat.JSON, OutputStyle.PRETTY, null);
msg = TestingUtilities.checkJsonIsSame(j1, fn);
- Assert.assertTrue(name+": "+msg, msg == null);
+ Assertions.assertNull(msg, name + ": " + msg);
String x2 = makeTempFilename();
Manager.compose(TestingUtilities.context, re, new FileOutputStream(x2), FhirFormat.XML, OutputStyle.PRETTY, null);
msg = TestingUtilities.checkXMLIsSame(x1, x2);
- Assert.assertTrue(name+": "+msg, msg == null);
+ Assertions.assertNull(msg, name + ": " + msg);
msg = TestingUtilities.checkXMLIsSame(filename, x1);
- Assert.assertTrue(name+": "+msg, msg == null);
+ Assertions.assertNull(msg, name + ": " + msg);
}
diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml
index 0e977721e..aa769f9ce 100644
--- a/org.hl7.fhir.dstu3/pom.xml
+++ b/org.hl7.fhir.dstu3/pom.xml
@@ -95,6 +95,20 @@
Saxon-HE
test
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit_jupiter_version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ ${junit_jupiter_version}
+ test
+
diff --git a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/FluentPathTests.java b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/FluentPathTests.java
index aa61f13a3..81c43f7a5 100644
--- a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/FluentPathTests.java
+++ b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/FluentPathTests.java
@@ -1,9 +1,12 @@
package org.hl7.fhir.dstu3.test;
-import junit.framework.Assert;
import org.hl7.fhir.dstu3.context.SimpleWorkerContext;
import org.hl7.fhir.dstu3.formats.XmlParser;
-import org.hl7.fhir.dstu3.model.*;
+import org.hl7.fhir.dstu3.model.Base;
+import org.hl7.fhir.dstu3.model.BooleanType;
+import org.hl7.fhir.dstu3.model.ExpressionNode;
+import org.hl7.fhir.dstu3.model.PrimitiveType;
+import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.test.support.TestingUtilities;
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
import org.hl7.fhir.exceptions.FHIRException;
@@ -36,8 +39,8 @@ public class FluentPathTests {
@BeforeAll
public void setup() throws IOException {
- TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\definitions.xml.zip");
- this.fp = new FHIRPathEngine(TestingUtilities.context);
+ TestingUtilities.context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\definitions.xml.zip");
+ this.fp = new FHIRPathEngine(TestingUtilities.context);
}
@ParameterizedTest(name = "{index}: file {0}")
diff --git a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/SnapShotGenerationTests.java b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/SnapShotGenerationTests.java
index a8bd318e5..e6f0598a9 100644
--- a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/SnapShotGenerationTests.java
+++ b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/SnapShotGenerationTests.java
@@ -1,18 +1,22 @@
package org.hl7.fhir.dstu3.test;
-import junit.framework.Assert;
import org.apache.commons.codec.Charsets;
import org.apache.commons.io.IOUtils;
import org.hl7.fhir.dstu3.conformance.ProfileUtilities;
import org.hl7.fhir.dstu3.context.SimpleWorkerContext;
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
import org.hl7.fhir.dstu3.formats.XmlParser;
-import org.hl7.fhir.dstu3.model.*;
+import org.hl7.fhir.dstu3.model.Base;
import org.hl7.fhir.dstu3.model.ExpressionNode.CollectionStatus;
+import org.hl7.fhir.dstu3.model.MetadataResource;
+import org.hl7.fhir.dstu3.model.Resource;
+import org.hl7.fhir.dstu3.model.StructureDefinition;
+import org.hl7.fhir.dstu3.model.TestScript;
import org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent;
import org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent;
import org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent;
import org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent;
+import org.hl7.fhir.dstu3.model.TypeDetails;
import org.hl7.fhir.dstu3.test.support.TestingUtilities;
import org.hl7.fhir.dstu3.utils.CodingUtilities;
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
@@ -22,6 +26,7 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.utilities.Utilities;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
@@ -29,7 +34,12 @@ import org.junit.jupiter.params.provider.MethodSource;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.stream.Stream;
@Disabled
@@ -82,7 +92,7 @@ public class SnapShotGenerationTests {
//ok, now the asserts:
for (int i = 1; i < test.getAction().size(); i++) {
SetupActionAssertComponent a = test.getAction().get(i).getAssert();
- Assert.assertTrue(a.getLabel() + ": " + a.getDescription(), fp.evaluateToBoolean(source, source, a.getExpression()));
+ Assertions.assertTrue(fp.evaluateToBoolean(source, source, a.getExpression()), a.getLabel() + ": " + a.getDescription());
}
}
diff --git a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/TurtleTests.java b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/TurtleTests.java
index c356370a7..27adbdfcb 100644
--- a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/TurtleTests.java
+++ b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/TurtleTests.java
@@ -1,8 +1,8 @@
package org.hl7.fhir.dstu3.test;
-import junit.framework.Assert;
import org.hl7.fhir.dstu3.utils.formats.Turtle;
import org.hl7.fhir.utilities.TextFile;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -17,9 +17,9 @@ public class TurtleTests {
String s = TextFile.fileToString(filename);
Turtle ttl = new Turtle();
ttl.parse(s);
- Assert.assertTrue(ok);
+ Assertions.assertTrue(ok);
} catch (Exception e) {
- Assert.assertTrue(e.getMessage(), !ok);
+ Assertions.assertFalse(ok, e.getMessage());
}
}
diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml
index 418f5bf8d..d603fbe0e 100644
--- a/org.hl7.fhir.r4/pom.xml
+++ b/org.hl7.fhir.r4/pom.xml
@@ -101,6 +101,20 @@
Saxon-HE
test
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit_jupiter_version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ ${junit_jupiter_version}
+ test
+
diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Duration.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Duration.java
index 55e0f2cad..17b6ce0ad 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Duration.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Duration.java
@@ -9,9 +9,9 @@ package org.hl7.fhir.r4.model;
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -50,119 +50,130 @@ package org.hl7.fhir.r4.model;
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
-import java.util.List;
+import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
-import ca.uhn.fhir.model.api.annotation.DatatypeDef;
+import java.util.List;
+
/**
* A length of time.
*/
-@DatatypeDef(name="Duration")
+@DatatypeDef(name = "Duration")
public class Duration extends Quantity implements ICompositeType {
- private static final long serialVersionUID = 0L;
+ private static final long serialVersionUID = 0L;
/**
* Constructor
*/
- public Duration() {
- super();
+ public Duration() {
+ super();
+ }
+
+ protected void listChildren(List children) {
+ super.listChildren(children);
+ }
+
+ @Override
+ public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
+ switch (_hash) {
+ default:
+ return super.getNamedProperty(_hash, _name, _checkValid);
}
- protected void listChildren(List children) {
- super.listChildren(children);
- }
+ }
- @Override
- public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
- switch (_hash) {
- default: return super.getNamedProperty(_hash, _name, _checkValid);
- }
+ @Override
+ public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
+ switch (hash) {
+ default:
+ return super.getProperty(hash, name, checkValid);
+ }
- }
+ }
- @Override
- public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
- switch (hash) {
- default: return super.getProperty(hash, name, checkValid);
- }
+ @Override
+ public Base setProperty(int hash, String name, Base value) throws FHIRException {
+ switch (hash) {
+ default:
+ return super.setProperty(hash, name, value);
+ }
- }
+ }
- @Override
- public Base setProperty(int hash, String name, Base value) throws FHIRException {
- switch (hash) {
- default: return super.setProperty(hash, name, value);
- }
+ @Override
+ public Base setProperty(String name, Base value) throws FHIRException {
+ return super.setProperty(name, value);
+ }
- }
+ @Override
+ public Base makeProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ default:
+ return super.makeProperty(hash, name);
+ }
- @Override
- public Base setProperty(String name, Base value) throws FHIRException {
- return super.setProperty(name, value);
- }
+ }
- @Override
- public Base makeProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- default: return super.makeProperty(hash, name);
- }
+ @Override
+ public String[] getTypesForProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ default:
+ return super.getTypesForProperty(hash, name);
+ }
- }
+ }
- @Override
- public String[] getTypesForProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- default: return super.getTypesForProperty(hash, name);
- }
-
- }
-
- @Override
- public Base addChild(String name) throws FHIRException {
- return super.addChild(name);
- }
+ @Override
+ public Base addChild(String name) throws FHIRException {
+ return super.addChild(name);
+ }
public String fhirType() {
return "Duration";
}
- public Duration copy() {
- Duration dst = new Duration();
- copyValues(dst);
- return dst;
- }
+ public Duration copy() {
+ Duration dst = new Duration();
+ copyValues(dst);
+ dst.value = value == null ? null : value.copy();
+ dst.comparator = comparator == null ? null : comparator.copy();
+ dst.unit = unit == null ? null : unit.copy();
+ dst.system = system == null ? null : system.copy();
+ dst.code = code == null ? null : code.copy();
+ return dst;
+ }
- protected Duration typedCopy() {
- return copy();
- }
+ protected Duration typedCopy() {
+ return copy();
+ }
- @Override
- public boolean equalsDeep(Base other_) {
- if (!super.equalsDeep(other_))
- return false;
- if (!(other_ instanceof Duration))
- return false;
- Duration o = (Duration) other_;
- return true;
- }
+ @Override
+ public boolean equalsDeep(Base other_) {
+ if (!super.equalsDeep(other_))
+ return false;
+ if (!(other_ instanceof Duration))
+ return false;
+ Duration o = (Duration) other_;
+ return true;
+ }
- @Override
- public boolean equalsShallow(Base other_) {
- if (!super.equalsShallow(other_))
- return false;
- if (!(other_ instanceof Duration))
- return false;
- Duration o = (Duration) other_;
- return true;
- }
+ @Override
+ public boolean equalsShallow(Base other_) {
+ if (!super.equalsShallow(other_))
+ return false;
+ if (!(other_ instanceof Duration))
+ return false;
+ Duration o = (Duration) other_;
+ return true;
+ }
- public boolean isEmpty() {
- return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
- }
+ public boolean isEmpty() {
+ return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
+ }
}
diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java
index b6491a176..1b5b01a17 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/MedicationRequest.java
@@ -9,9 +9,9 @@ package org.hl7.fhir.r4.model;
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,215 +23,259 @@ package org.hl7.fhir.r4.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modification,
+
+ Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
+
+ * Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- * Neither the name of HL7 nor the names of its contributors may be used to
- endorse or promote products derived from this software without specific
+ * Neither the name of HL7 nor the names of its contributors may be used to
+ endorse or promote products derived from this software without specific
prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
+
*/
// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.hl7.fhir.exceptions.FHIRException;
-import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
+import org.hl7.fhir.exceptions.FHIRException;
+import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
/**
* An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
*/
-@ResourceDef(name="MedicationRequest", profile="http://hl7.org/fhir/StructureDefinition/MedicationRequest")
+@ResourceDef(name = "MedicationRequest", profile = "http://hl7.org/fhir/StructureDefinition/MedicationRequest")
public class MedicationRequest extends DomainResource {
- public enum MedicationRequestStatus {
- /**
- * The prescription is 'actionable', but not all actions that are implied by it have occurred yet.
- */
- ACTIVE,
- /**
- * Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called 'suspended'.
- */
- ONHOLD,
- /**
- * The prescription has been withdrawn before any administrations have occurred
- */
- CANCELLED,
- /**
- * All actions that are implied by the prescription have occurred.
- */
- COMPLETED,
- /**
- * Some of the actions that are implied by the medication request may have occurred. For example, the medication may have been dispensed and the patient may have taken some of the medication. Clinical decision support systems should take this status into account
- */
- ENTEREDINERROR,
- /**
- * Actions implied by the prescription are to be permanently halted, before all of the administrations occurred. This should not be used if the original order was entered in error
- */
- STOPPED,
- /**
- * The prescription is not yet 'actionable', e.g. it is a work in progress, requires sign-off, verification or needs to be run through decision support process.
- */
- DRAFT,
- /**
- * The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.
- */
- UNKNOWN,
- /**
- * added to help the parsers with the generic types
- */
- NULL;
- public static MedicationRequestStatus fromCode(String codeString) throws FHIRException {
- if (codeString == null || "".equals(codeString))
- return null;
- if ("active".equals(codeString))
- return ACTIVE;
- if ("on-hold".equals(codeString))
- return ONHOLD;
- if ("cancelled".equals(codeString))
- return CANCELLED;
- if ("completed".equals(codeString))
- return COMPLETED;
- if ("entered-in-error".equals(codeString))
- return ENTEREDINERROR;
- if ("stopped".equals(codeString))
- return STOPPED;
- if ("draft".equals(codeString))
- return DRAFT;
- if ("unknown".equals(codeString))
- return UNKNOWN;
- if (Configuration.isAcceptInvalidEnums())
- return null;
- else
- throw new FHIRException("Unknown MedicationRequestStatus code '"+codeString+"'");
- }
- public String toCode() {
- switch (this) {
- case ACTIVE: return "active";
- case ONHOLD: return "on-hold";
- case CANCELLED: return "cancelled";
- case COMPLETED: return "completed";
- case ENTEREDINERROR: return "entered-in-error";
- case STOPPED: return "stopped";
- case DRAFT: return "draft";
- case UNKNOWN: return "unknown";
- default: return "?";
- }
- }
- public String getSystem() {
- switch (this) {
- case ACTIVE: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- case ONHOLD: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- case CANCELLED: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- case COMPLETED: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- case ENTEREDINERROR: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- case STOPPED: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- case DRAFT: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- case UNKNOWN: return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
- default: return "?";
- }
- }
- public String getDefinition() {
- switch (this) {
- case ACTIVE: return "The prescription is 'actionable', but not all actions that are implied by it have occurred yet.";
- case ONHOLD: return "Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called 'suspended'.";
- case CANCELLED: return "The prescription has been withdrawn before any administrations have occurred";
- case COMPLETED: return "All actions that are implied by the prescription have occurred.";
- case ENTEREDINERROR: return "Some of the actions that are implied by the medication request may have occurred. For example, the medication may have been dispensed and the patient may have taken some of the medication. Clinical decision support systems should take this status into account";
- case STOPPED: return "Actions implied by the prescription are to be permanently halted, before all of the administrations occurred. This should not be used if the original order was entered in error";
- case DRAFT: return "The prescription is not yet 'actionable', e.g. it is a work in progress, requires sign-off, verification or needs to be run through decision support process.";
- case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.";
- default: return "?";
- }
- }
- public String getDisplay() {
- switch (this) {
- case ACTIVE: return "Active";
- case ONHOLD: return "On Hold";
- case CANCELLED: return "Cancelled";
- case COMPLETED: return "Completed";
- case ENTEREDINERROR: return "Entered in Error";
- case STOPPED: return "Stopped";
- case DRAFT: return "Draft";
- case UNKNOWN: return "Unknown";
- default: return "?";
- }
- }
+ public enum MedicationRequestStatus {
+ /**
+ * The prescription is 'actionable', but not all actions that are implied by it have occurred yet.
+ */
+ ACTIVE,
+ /**
+ * Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called 'suspended'.
+ */
+ ONHOLD,
+ /**
+ * The prescription has been withdrawn before any administrations have occurred
+ */
+ CANCELLED,
+ /**
+ * All actions that are implied by the prescription have occurred.
+ */
+ COMPLETED,
+ /**
+ * Some of the actions that are implied by the medication request may have occurred. For example, the medication may have been dispensed and the patient may have taken some of the medication. Clinical decision support systems should take this status into account
+ */
+ ENTEREDINERROR,
+ /**
+ * Actions implied by the prescription are to be permanently halted, before all of the administrations occurred. This should not be used if the original order was entered in error
+ */
+ STOPPED,
+ /**
+ * The prescription is not yet 'actionable', e.g. it is a work in progress, requires sign-off, verification or needs to be run through decision support process.
+ */
+ DRAFT,
+ /**
+ * The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.
+ */
+ UNKNOWN,
+ /**
+ * added to help the parsers with the generic types
+ */
+ NULL;
+
+ public static MedicationRequestStatus fromCode(String codeString) throws FHIRException {
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("active".equals(codeString))
+ return ACTIVE;
+ if ("on-hold".equals(codeString))
+ return ONHOLD;
+ if ("cancelled".equals(codeString))
+ return CANCELLED;
+ if ("completed".equals(codeString))
+ return COMPLETED;
+ if ("entered-in-error".equals(codeString))
+ return ENTEREDINERROR;
+ if ("stopped".equals(codeString))
+ return STOPPED;
+ if ("draft".equals(codeString))
+ return DRAFT;
+ if ("unknown".equals(codeString))
+ return UNKNOWN;
+ if (Configuration.isAcceptInvalidEnums())
+ return null;
+ else
+ throw new FHIRException("Unknown MedicationRequestStatus code '" + codeString + "'");
}
+ public String toCode() {
+ switch (this) {
+ case ACTIVE:
+ return "active";
+ case ONHOLD:
+ return "on-hold";
+ case CANCELLED:
+ return "cancelled";
+ case COMPLETED:
+ return "completed";
+ case ENTEREDINERROR:
+ return "entered-in-error";
+ case STOPPED:
+ return "stopped";
+ case DRAFT:
+ return "draft";
+ case UNKNOWN:
+ return "unknown";
+ default:
+ return "?";
+ }
+ }
+
+ public String getSystem() {
+ switch (this) {
+ case ACTIVE:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ case ONHOLD:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ case CANCELLED:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ case COMPLETED:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ case ENTEREDINERROR:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ case STOPPED:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ case DRAFT:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ case UNKNOWN:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-status";
+ default:
+ return "?";
+ }
+ }
+
+ public String getDefinition() {
+ switch (this) {
+ case ACTIVE:
+ return "The prescription is 'actionable', but not all actions that are implied by it have occurred yet.";
+ case ONHOLD:
+ return "Actions implied by the prescription are to be temporarily halted, but are expected to continue later. May also be called 'suspended'.";
+ case CANCELLED:
+ return "The prescription has been withdrawn before any administrations have occurred";
+ case COMPLETED:
+ return "All actions that are implied by the prescription have occurred.";
+ case ENTEREDINERROR:
+ return "Some of the actions that are implied by the medication request may have occurred. For example, the medication may have been dispensed and the patient may have taken some of the medication. Clinical decision support systems should take this status into account";
+ case STOPPED:
+ return "Actions implied by the prescription are to be permanently halted, before all of the administrations occurred. This should not be used if the original order was entered in error";
+ case DRAFT:
+ return "The prescription is not yet 'actionable', e.g. it is a work in progress, requires sign-off, verification or needs to be run through decision support process.";
+ case UNKNOWN:
+ return "The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.";
+ default:
+ return "?";
+ }
+ }
+
+ public String getDisplay() {
+ switch (this) {
+ case ACTIVE:
+ return "Active";
+ case ONHOLD:
+ return "On Hold";
+ case CANCELLED:
+ return "Cancelled";
+ case COMPLETED:
+ return "Completed";
+ case ENTEREDINERROR:
+ return "Entered in Error";
+ case STOPPED:
+ return "Stopped";
+ case DRAFT:
+ return "Draft";
+ case UNKNOWN:
+ return "Unknown";
+ default:
+ return "?";
+ }
+ }
+ }
+
public static class MedicationRequestStatusEnumFactory implements EnumFactory {
public MedicationRequestStatus fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
- if (codeString == null || "".equals(codeString))
- return null;
- if ("active".equals(codeString))
- return MedicationRequestStatus.ACTIVE;
- if ("on-hold".equals(codeString))
- return MedicationRequestStatus.ONHOLD;
- if ("cancelled".equals(codeString))
- return MedicationRequestStatus.CANCELLED;
- if ("completed".equals(codeString))
- return MedicationRequestStatus.COMPLETED;
- if ("entered-in-error".equals(codeString))
- return MedicationRequestStatus.ENTEREDINERROR;
- if ("stopped".equals(codeString))
- return MedicationRequestStatus.STOPPED;
- if ("draft".equals(codeString))
- return MedicationRequestStatus.DRAFT;
- if ("unknown".equals(codeString))
- return MedicationRequestStatus.UNKNOWN;
- throw new IllegalArgumentException("Unknown MedicationRequestStatus code '"+codeString+"'");
- }
- public Enumeration fromType(Base code) throws FHIRException {
- if (code == null)
- return null;
- if (code.isEmpty())
- return new Enumeration(this);
- String codeString = ((PrimitiveType) code).asStringValue();
- if (codeString == null || "".equals(codeString))
- return null;
- if ("active".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.ACTIVE);
- if ("on-hold".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.ONHOLD);
- if ("cancelled".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.CANCELLED);
- if ("completed".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.COMPLETED);
- if ("entered-in-error".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.ENTEREDINERROR);
- if ("stopped".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.STOPPED);
- if ("draft".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.DRAFT);
- if ("unknown".equals(codeString))
- return new Enumeration(this, MedicationRequestStatus.UNKNOWN);
- throw new FHIRException("Unknown MedicationRequestStatus code '"+codeString+"'");
- }
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("active".equals(codeString))
+ return MedicationRequestStatus.ACTIVE;
+ if ("on-hold".equals(codeString))
+ return MedicationRequestStatus.ONHOLD;
+ if ("cancelled".equals(codeString))
+ return MedicationRequestStatus.CANCELLED;
+ if ("completed".equals(codeString))
+ return MedicationRequestStatus.COMPLETED;
+ if ("entered-in-error".equals(codeString))
+ return MedicationRequestStatus.ENTEREDINERROR;
+ if ("stopped".equals(codeString))
+ return MedicationRequestStatus.STOPPED;
+ if ("draft".equals(codeString))
+ return MedicationRequestStatus.DRAFT;
+ if ("unknown".equals(codeString))
+ return MedicationRequestStatus.UNKNOWN;
+ throw new IllegalArgumentException("Unknown MedicationRequestStatus code '" + codeString + "'");
+ }
+
+ public Enumeration fromType(Base code) throws FHIRException {
+ if (code == null)
+ return null;
+ if (code.isEmpty())
+ return new Enumeration(this);
+ String codeString = ((PrimitiveType) code).asStringValue();
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("active".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.ACTIVE);
+ if ("on-hold".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.ONHOLD);
+ if ("cancelled".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.CANCELLED);
+ if ("completed".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.COMPLETED);
+ if ("entered-in-error".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.ENTEREDINERROR);
+ if ("stopped".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.STOPPED);
+ if ("draft".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.DRAFT);
+ if ("unknown".equals(codeString))
+ return new Enumeration(this, MedicationRequestStatus.UNKNOWN);
+ throw new FHIRException("Unknown MedicationRequestStatus code '" + codeString + "'");
+ }
+
public String toCode(MedicationRequestStatus code) {
if (code == MedicationRequestStatus.ACTIVE)
return "active";
@@ -250,176 +294,220 @@ public class MedicationRequest extends DomainResource {
if (code == MedicationRequestStatus.UNKNOWN)
return "unknown";
return "?";
- }
+ }
+
public String toSystem(MedicationRequestStatus code) {
return code.getSystem();
+ }
+ }
+
+ public enum MedicationRequestIntent {
+ /**
+ * The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act
+ */
+ PROPOSAL,
+ /**
+ * The request represents an intention to ensure something occurs without providing an authorization for others to act.
+ */
+ PLAN,
+ /**
+ * The request represents a request/demand and authorization for action
+ */
+ ORDER,
+ /**
+ * The request represents the original authorization for the medication request.
+ */
+ ORIGINALORDER,
+ /**
+ * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization..
+ */
+ REFLEXORDER,
+ /**
+ * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.
+ */
+ FILLERORDER,
+ /**
+ * The request represents an instance for the particular order, for example a medication administration record.
+ */
+ INSTANCEORDER,
+ /**
+ * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.
+ */
+ OPTION,
+ /**
+ * added to help the parsers with the generic types
+ */
+ NULL;
+
+ public static MedicationRequestIntent fromCode(String codeString) throws FHIRException {
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("proposal".equals(codeString))
+ return PROPOSAL;
+ if ("plan".equals(codeString))
+ return PLAN;
+ if ("order".equals(codeString))
+ return ORDER;
+ if ("original-order".equals(codeString))
+ return ORIGINALORDER;
+ if ("reflex-order".equals(codeString))
+ return REFLEXORDER;
+ if ("filler-order".equals(codeString))
+ return FILLERORDER;
+ if ("instance-order".equals(codeString))
+ return INSTANCEORDER;
+ if ("option".equals(codeString))
+ return OPTION;
+ if (Configuration.isAcceptInvalidEnums())
+ return null;
+ else
+ throw new FHIRException("Unknown MedicationRequestIntent code '" + codeString + "'");
+ }
+
+ public String toCode() {
+ switch (this) {
+ case PROPOSAL:
+ return "proposal";
+ case PLAN:
+ return "plan";
+ case ORDER:
+ return "order";
+ case ORIGINALORDER:
+ return "original-order";
+ case REFLEXORDER:
+ return "reflex-order";
+ case FILLERORDER:
+ return "filler-order";
+ case INSTANCEORDER:
+ return "instance-order";
+ case OPTION:
+ return "option";
+ default:
+ return "?";
}
}
- public enum MedicationRequestIntent {
- /**
- * The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act
- */
- PROPOSAL,
- /**
- * The request represents an intention to ensure something occurs without providing an authorization for others to act.
- */
- PLAN,
- /**
- * The request represents a request/demand and authorization for action
- */
- ORDER,
- /**
- * The request represents the original authorization for the medication request.
- */
- ORIGINALORDER,
- /**
- * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization..
- */
- REFLEXORDER,
- /**
- * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.
- */
- FILLERORDER,
- /**
- * The request represents an instance for the particular order, for example a medication administration record.
- */
- INSTANCEORDER,
- /**
- * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.
- */
- OPTION,
- /**
- * added to help the parsers with the generic types
- */
- NULL;
- public static MedicationRequestIntent fromCode(String codeString) throws FHIRException {
- if (codeString == null || "".equals(codeString))
- return null;
- if ("proposal".equals(codeString))
- return PROPOSAL;
- if ("plan".equals(codeString))
- return PLAN;
- if ("order".equals(codeString))
- return ORDER;
- if ("original-order".equals(codeString))
- return ORIGINALORDER;
- if ("reflex-order".equals(codeString))
- return REFLEXORDER;
- if ("filler-order".equals(codeString))
- return FILLERORDER;
- if ("instance-order".equals(codeString))
- return INSTANCEORDER;
- if ("option".equals(codeString))
- return OPTION;
- if (Configuration.isAcceptInvalidEnums())
- return null;
- else
- throw new FHIRException("Unknown MedicationRequestIntent code '"+codeString+"'");
- }
- public String toCode() {
- switch (this) {
- case PROPOSAL: return "proposal";
- case PLAN: return "plan";
- case ORDER: return "order";
- case ORIGINALORDER: return "original-order";
- case REFLEXORDER: return "reflex-order";
- case FILLERORDER: return "filler-order";
- case INSTANCEORDER: return "instance-order";
- case OPTION: return "option";
- default: return "?";
- }
- }
- public String getSystem() {
- switch (this) {
- case PROPOSAL: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- case PLAN: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- case ORDER: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- case ORIGINALORDER: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- case REFLEXORDER: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- case FILLERORDER: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- case INSTANCEORDER: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- case OPTION: return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
- default: return "?";
- }
- }
- public String getDefinition() {
- switch (this) {
- case PROPOSAL: return "The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act";
- case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
- case ORDER: return "The request represents a request/demand and authorization for action";
- case ORIGINALORDER: return "The request represents the original authorization for the medication request.";
- case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization..";
- case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.";
- case INSTANCEORDER: return "The request represents an instance for the particular order, for example a medication administration record.";
- case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.";
- default: return "?";
- }
- }
- public String getDisplay() {
- switch (this) {
- case PROPOSAL: return "Proposal";
- case PLAN: return "Plan";
- case ORDER: return "Order";
- case ORIGINALORDER: return "Original Order";
- case REFLEXORDER: return "Reflex Order";
- case FILLERORDER: return "Filler Order";
- case INSTANCEORDER: return "Instance Order";
- case OPTION: return "Option";
- default: return "?";
- }
- }
+ public String getSystem() {
+ switch (this) {
+ case PROPOSAL:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ case PLAN:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ case ORDER:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ case ORIGINALORDER:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ case REFLEXORDER:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ case FILLERORDER:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ case INSTANCEORDER:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ case OPTION:
+ return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
+ default:
+ return "?";
+ }
}
+ public String getDefinition() {
+ switch (this) {
+ case PROPOSAL:
+ return "The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act";
+ case PLAN:
+ return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
+ case ORDER:
+ return "The request represents a request/demand and authorization for action";
+ case ORIGINALORDER:
+ return "The request represents the original authorization for the medication request.";
+ case REFLEXORDER:
+ return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization..";
+ case FILLERORDER:
+ return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.";
+ case INSTANCEORDER:
+ return "The request represents an instance for the particular order, for example a medication administration record.";
+ case OPTION:
+ return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.";
+ default:
+ return "?";
+ }
+ }
+
+ public String getDisplay() {
+ switch (this) {
+ case PROPOSAL:
+ return "Proposal";
+ case PLAN:
+ return "Plan";
+ case ORDER:
+ return "Order";
+ case ORIGINALORDER:
+ return "Original Order";
+ case REFLEXORDER:
+ return "Reflex Order";
+ case FILLERORDER:
+ return "Filler Order";
+ case INSTANCEORDER:
+ return "Instance Order";
+ case OPTION:
+ return "Option";
+ default:
+ return "?";
+ }
+ }
+ }
+
public static class MedicationRequestIntentEnumFactory implements EnumFactory {
public MedicationRequestIntent fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
- if (codeString == null || "".equals(codeString))
- return null;
- if ("proposal".equals(codeString))
- return MedicationRequestIntent.PROPOSAL;
- if ("plan".equals(codeString))
- return MedicationRequestIntent.PLAN;
- if ("order".equals(codeString))
- return MedicationRequestIntent.ORDER;
- if ("original-order".equals(codeString))
- return MedicationRequestIntent.ORIGINALORDER;
- if ("reflex-order".equals(codeString))
- return MedicationRequestIntent.REFLEXORDER;
- if ("filler-order".equals(codeString))
- return MedicationRequestIntent.FILLERORDER;
- if ("instance-order".equals(codeString))
- return MedicationRequestIntent.INSTANCEORDER;
- if ("option".equals(codeString))
- return MedicationRequestIntent.OPTION;
- throw new IllegalArgumentException("Unknown MedicationRequestIntent code '"+codeString+"'");
- }
- public Enumeration fromType(Base code) throws FHIRException {
- if (code == null)
- return null;
- if (code.isEmpty())
- return new Enumeration(this);
- String codeString = ((PrimitiveType) code).asStringValue();
- if (codeString == null || "".equals(codeString))
- return null;
- if ("proposal".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.PROPOSAL);
- if ("plan".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.PLAN);
- if ("order".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.ORDER);
- if ("original-order".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.ORIGINALORDER);
- if ("reflex-order".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.REFLEXORDER);
- if ("filler-order".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.FILLERORDER);
- if ("instance-order".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.INSTANCEORDER);
- if ("option".equals(codeString))
- return new Enumeration(this, MedicationRequestIntent.OPTION);
- throw new FHIRException("Unknown MedicationRequestIntent code '"+codeString+"'");
- }
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("proposal".equals(codeString))
+ return MedicationRequestIntent.PROPOSAL;
+ if ("plan".equals(codeString))
+ return MedicationRequestIntent.PLAN;
+ if ("order".equals(codeString))
+ return MedicationRequestIntent.ORDER;
+ if ("original-order".equals(codeString))
+ return MedicationRequestIntent.ORIGINALORDER;
+ if ("reflex-order".equals(codeString))
+ return MedicationRequestIntent.REFLEXORDER;
+ if ("filler-order".equals(codeString))
+ return MedicationRequestIntent.FILLERORDER;
+ if ("instance-order".equals(codeString))
+ return MedicationRequestIntent.INSTANCEORDER;
+ if ("option".equals(codeString))
+ return MedicationRequestIntent.OPTION;
+ throw new IllegalArgumentException("Unknown MedicationRequestIntent code '" + codeString + "'");
+ }
+
+ public Enumeration fromType(Base code) throws FHIRException {
+ if (code == null)
+ return null;
+ if (code.isEmpty())
+ return new Enumeration(this);
+ String codeString = ((PrimitiveType) code).asStringValue();
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("proposal".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.PROPOSAL);
+ if ("plan".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.PLAN);
+ if ("order".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.ORDER);
+ if ("original-order".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.ORIGINALORDER);
+ if ("reflex-order".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.REFLEXORDER);
+ if ("filler-order".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.FILLERORDER);
+ if ("instance-order".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.INSTANCEORDER);
+ if ("option".equals(codeString))
+ return new Enumeration(this, MedicationRequestIntent.OPTION);
+ throw new FHIRException("Unknown MedicationRequestIntent code '" + codeString + "'");
+ }
+
public String toCode(MedicationRequestIntent code) {
if (code == MedicationRequestIntent.PROPOSAL)
return "proposal";
@@ -438,120 +526,148 @@ public class MedicationRequest extends DomainResource {
if (code == MedicationRequestIntent.OPTION)
return "option";
return "?";
- }
+ }
+
public String toSystem(MedicationRequestIntent code) {
return code.getSystem();
+ }
+ }
+
+ public enum MedicationRequestPriority {
+ /**
+ * The request has normal priority.
+ */
+ ROUTINE,
+ /**
+ * The request should be actioned promptly - higher priority than routine.
+ */
+ URGENT,
+ /**
+ * The request should be actioned as soon as possible - higher priority than urgent.
+ */
+ ASAP,
+ /**
+ * The request should be actioned immediately - highest possible priority. E.g. an emergency.
+ */
+ STAT,
+ /**
+ * added to help the parsers with the generic types
+ */
+ NULL;
+
+ public static MedicationRequestPriority fromCode(String codeString) throws FHIRException {
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("routine".equals(codeString))
+ return ROUTINE;
+ if ("urgent".equals(codeString))
+ return URGENT;
+ if ("asap".equals(codeString))
+ return ASAP;
+ if ("stat".equals(codeString))
+ return STAT;
+ if (Configuration.isAcceptInvalidEnums())
+ return null;
+ else
+ throw new FHIRException("Unknown MedicationRequestPriority code '" + codeString + "'");
+ }
+
+ public String toCode() {
+ switch (this) {
+ case ROUTINE:
+ return "routine";
+ case URGENT:
+ return "urgent";
+ case ASAP:
+ return "asap";
+ case STAT:
+ return "stat";
+ default:
+ return "?";
}
}
- public enum MedicationRequestPriority {
- /**
- * The request has normal priority.
- */
- ROUTINE,
- /**
- * The request should be actioned promptly - higher priority than routine.
- */
- URGENT,
- /**
- * The request should be actioned as soon as possible - higher priority than urgent.
- */
- ASAP,
- /**
- * The request should be actioned immediately - highest possible priority. E.g. an emergency.
- */
- STAT,
- /**
- * added to help the parsers with the generic types
- */
- NULL;
- public static MedicationRequestPriority fromCode(String codeString) throws FHIRException {
- if (codeString == null || "".equals(codeString))
- return null;
- if ("routine".equals(codeString))
- return ROUTINE;
- if ("urgent".equals(codeString))
- return URGENT;
- if ("asap".equals(codeString))
- return ASAP;
- if ("stat".equals(codeString))
- return STAT;
- if (Configuration.isAcceptInvalidEnums())
- return null;
- else
- throw new FHIRException("Unknown MedicationRequestPriority code '"+codeString+"'");
- }
- public String toCode() {
- switch (this) {
- case ROUTINE: return "routine";
- case URGENT: return "urgent";
- case ASAP: return "asap";
- case STAT: return "stat";
- default: return "?";
- }
- }
- public String getSystem() {
- switch (this) {
- case ROUTINE: return "http://hl7.org/fhir/request-priority";
- case URGENT: return "http://hl7.org/fhir/request-priority";
- case ASAP: return "http://hl7.org/fhir/request-priority";
- case STAT: return "http://hl7.org/fhir/request-priority";
- default: return "?";
- }
- }
- public String getDefinition() {
- switch (this) {
- case ROUTINE: return "The request has normal priority.";
- case URGENT: return "The request should be actioned promptly - higher priority than routine.";
- case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent.";
- case STAT: return "The request should be actioned immediately - highest possible priority. E.g. an emergency.";
- default: return "?";
- }
- }
- public String getDisplay() {
- switch (this) {
- case ROUTINE: return "Routine";
- case URGENT: return "Urgent";
- case ASAP: return "ASAP";
- case STAT: return "STAT";
- default: return "?";
- }
- }
+ public String getSystem() {
+ switch (this) {
+ case ROUTINE:
+ return "http://hl7.org/fhir/request-priority";
+ case URGENT:
+ return "http://hl7.org/fhir/request-priority";
+ case ASAP:
+ return "http://hl7.org/fhir/request-priority";
+ case STAT:
+ return "http://hl7.org/fhir/request-priority";
+ default:
+ return "?";
+ }
}
+ public String getDefinition() {
+ switch (this) {
+ case ROUTINE:
+ return "The request has normal priority.";
+ case URGENT:
+ return "The request should be actioned promptly - higher priority than routine.";
+ case ASAP:
+ return "The request should be actioned as soon as possible - higher priority than urgent.";
+ case STAT:
+ return "The request should be actioned immediately - highest possible priority. E.g. an emergency.";
+ default:
+ return "?";
+ }
+ }
+
+ public String getDisplay() {
+ switch (this) {
+ case ROUTINE:
+ return "Routine";
+ case URGENT:
+ return "Urgent";
+ case ASAP:
+ return "ASAP";
+ case STAT:
+ return "STAT";
+ default:
+ return "?";
+ }
+ }
+ }
+
public static class MedicationRequestPriorityEnumFactory implements EnumFactory {
public MedicationRequestPriority fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
- if (codeString == null || "".equals(codeString))
- return null;
- if ("routine".equals(codeString))
- return MedicationRequestPriority.ROUTINE;
- if ("urgent".equals(codeString))
- return MedicationRequestPriority.URGENT;
- if ("asap".equals(codeString))
- return MedicationRequestPriority.ASAP;
- if ("stat".equals(codeString))
- return MedicationRequestPriority.STAT;
- throw new IllegalArgumentException("Unknown MedicationRequestPriority code '"+codeString+"'");
- }
- public Enumeration fromType(Base code) throws FHIRException {
- if (code == null)
- return null;
- if (code.isEmpty())
- return new Enumeration(this);
- String codeString = ((PrimitiveType) code).asStringValue();
- if (codeString == null || "".equals(codeString))
- return null;
- if ("routine".equals(codeString))
- return new Enumeration(this, MedicationRequestPriority.ROUTINE);
- if ("urgent".equals(codeString))
- return new Enumeration(this, MedicationRequestPriority.URGENT);
- if ("asap".equals(codeString))
- return new Enumeration(this, MedicationRequestPriority.ASAP);
- if ("stat".equals(codeString))
- return new Enumeration(this, MedicationRequestPriority.STAT);
- throw new FHIRException("Unknown MedicationRequestPriority code '"+codeString+"'");
- }
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("routine".equals(codeString))
+ return MedicationRequestPriority.ROUTINE;
+ if ("urgent".equals(codeString))
+ return MedicationRequestPriority.URGENT;
+ if ("asap".equals(codeString))
+ return MedicationRequestPriority.ASAP;
+ if ("stat".equals(codeString))
+ return MedicationRequestPriority.STAT;
+ throw new IllegalArgumentException("Unknown MedicationRequestPriority code '" + codeString + "'");
+ }
+
+ public Enumeration fromType(Base code) throws FHIRException {
+ if (code == null)
+ return null;
+ if (code.isEmpty())
+ return new Enumeration(this);
+ String codeString = ((PrimitiveType) code).asStringValue();
+ if (codeString == null || "".equals(codeString))
+ return null;
+ if ("routine".equals(codeString))
+ return new Enumeration(this, MedicationRequestPriority.ROUTINE);
+ if ("urgent".equals(codeString))
+ return new Enumeration(this, MedicationRequestPriority.URGENT);
+ if ("asap".equals(codeString))
+ return new Enumeration(this, MedicationRequestPriority.ASAP);
+ if ("stat".equals(codeString))
+ return new Enumeration(this, MedicationRequestPriority.STAT);
+ throw new FHIRException("Unknown MedicationRequestPriority code '" + codeString + "'");
+ }
+
public String toCode(MedicationRequestPriority code) {
if (code == MedicationRequestPriority.ROUTINE)
return "routine";
@@ -562,330 +678,347 @@ public class MedicationRequest extends DomainResource {
if (code == MedicationRequestPriority.STAT)
return "stat";
return "?";
- }
- public String toSystem(MedicationRequestPriority code) {
- return code.getSystem();
- }
}
- @Block()
- public static class MedicationRequestDispenseRequestComponent extends BackboneElement implements IBaseBackboneElement {
- /**
- * Indicates the quantity or duration for the first dispense of the medication.
- */
- @Child(name = "initialFill", type = {}, order=1, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="First fill details", formalDefinition="Indicates the quantity or duration for the first dispense of the medication." )
- protected MedicationRequestDispenseRequestInitialFillComponent initialFill;
+ public String toSystem(MedicationRequestPriority code) {
+ return code.getSystem();
+ }
+ }
- /**
- * The minimum period of time that must occur between dispenses of the medication.
- */
- @Child(name = "dispenseInterval", type = {Duration.class}, order=2, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Minimum period of time between dispenses", formalDefinition="The minimum period of time that must occur between dispenses of the medication." )
- protected Duration dispenseInterval;
+ @Block()
+ public static class MedicationRequestDispenseRequestComponent extends BackboneElement implements IBaseBackboneElement {
+ /**
+ * Indicates the quantity or duration for the first dispense of the medication.
+ */
+ @Child(name = "initialFill", type = {}, order = 1, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "First fill details", formalDefinition = "Indicates the quantity or duration for the first dispense of the medication.")
+ protected MedicationRequestDispenseRequestInitialFillComponent initialFill;
- /**
- * This indicates the validity period of a prescription (stale dating the Prescription).
- */
- @Child(name = "validityPeriod", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Time period supply is authorized for", formalDefinition="This indicates the validity period of a prescription (stale dating the Prescription)." )
- protected Period validityPeriod;
+ /**
+ * The minimum period of time that must occur between dispenses of the medication.
+ */
+ @Child(name = "dispenseInterval", type = {Duration.class}, order = 2, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Minimum period of time between dispenses", formalDefinition = "The minimum period of time that must occur between dispenses of the medication.")
+ protected Duration dispenseInterval;
- /**
- * An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.
- */
- @Child(name = "numberOfRepeatsAllowed", type = {UnsignedIntType.class}, order=4, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Number of refills authorized", formalDefinition="An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense." )
- protected UnsignedIntType numberOfRepeatsAllowed;
+ /**
+ * This indicates the validity period of a prescription (stale dating the Prescription).
+ */
+ @Child(name = "validityPeriod", type = {Period.class}, order = 3, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Time period supply is authorized for", formalDefinition = "This indicates the validity period of a prescription (stale dating the Prescription).")
+ protected Period validityPeriod;
- /**
- * The amount that is to be dispensed for one fill.
- */
- @Child(name = "quantity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Amount of medication to supply per dispense", formalDefinition="The amount that is to be dispensed for one fill." )
- protected Quantity quantity;
+ /**
+ * An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.
+ */
+ @Child(name = "numberOfRepeatsAllowed", type = {UnsignedIntType.class}, order = 4, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Number of refills authorized", formalDefinition = "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.")
+ protected UnsignedIntType numberOfRepeatsAllowed;
- /**
- * Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.
- */
- @Child(name = "expectedSupplyDuration", type = {Duration.class}, order=6, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Number of days supply per dispense", formalDefinition="Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last." )
- protected Duration expectedSupplyDuration;
+ /**
+ * The amount that is to be dispensed for one fill.
+ */
+ @Child(name = "quantity", type = {Quantity.class}, order = 5, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Amount of medication to supply per dispense", formalDefinition = "The amount that is to be dispensed for one fill.")
+ protected Quantity quantity;
- /**
- * Indicates the intended dispensing Organization specified by the prescriber.
- */
- @Child(name = "performer", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Intended dispenser", formalDefinition="Indicates the intended dispensing Organization specified by the prescriber." )
- protected Reference performer;
+ /**
+ * Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.
+ */
+ @Child(name = "expectedSupplyDuration", type = {Duration.class}, order = 6, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Number of days supply per dispense", formalDefinition = "Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.")
+ protected Duration expectedSupplyDuration;
- /**
- * The actual object that is the target of the reference (Indicates the intended dispensing Organization specified by the prescriber.)
- */
- protected Organization performerTarget;
+ /**
+ * Indicates the intended dispensing Organization specified by the prescriber.
+ */
+ @Child(name = "performer", type = {Organization.class}, order = 7, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Intended dispenser", formalDefinition = "Indicates the intended dispensing Organization specified by the prescriber.")
+ protected Reference performer;
- private static final long serialVersionUID = -1680129929L;
+ /**
+ * The actual object that is the target of the reference (Indicates the intended dispensing Organization specified by the prescriber.)
+ */
+ protected Organization performerTarget;
+
+ private static final long serialVersionUID = -1680129929L;
/**
* Constructor
*/
- public MedicationRequestDispenseRequestComponent() {
- super();
+ public MedicationRequestDispenseRequestComponent() {
+ super();
+ }
+
+ /**
+ * @return {@link #initialFill} (Indicates the quantity or duration for the first dispense of the medication.)
+ */
+ public MedicationRequestDispenseRequestInitialFillComponent getInitialFill() {
+ if (this.initialFill == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.initialFill");
+ else if (Configuration.doAutoCreate())
+ this.initialFill = new MedicationRequestDispenseRequestInitialFillComponent(); // cc
+ return this.initialFill;
+ }
+
+ public boolean hasInitialFill() {
+ return this.initialFill != null && !this.initialFill.isEmpty();
+ }
+
+ /**
+ * @param value {@link #initialFill} (Indicates the quantity or duration for the first dispense of the medication.)
+ */
+ public MedicationRequestDispenseRequestComponent setInitialFill(MedicationRequestDispenseRequestInitialFillComponent value) {
+ this.initialFill = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #dispenseInterval} (The minimum period of time that must occur between dispenses of the medication.)
+ */
+ public Duration getDispenseInterval() {
+ if (this.dispenseInterval == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.dispenseInterval");
+ else if (Configuration.doAutoCreate())
+ this.dispenseInterval = new Duration(); // cc
+ return this.dispenseInterval;
+ }
+
+ public boolean hasDispenseInterval() {
+ return this.dispenseInterval != null && !this.dispenseInterval.isEmpty();
+ }
+
+ /**
+ * @param value {@link #dispenseInterval} (The minimum period of time that must occur between dispenses of the medication.)
+ */
+ public MedicationRequestDispenseRequestComponent setDispenseInterval(Duration value) {
+ this.dispenseInterval = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #validityPeriod} (This indicates the validity period of a prescription (stale dating the Prescription).)
+ */
+ public Period getValidityPeriod() {
+ if (this.validityPeriod == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.validityPeriod");
+ else if (Configuration.doAutoCreate())
+ this.validityPeriod = new Period(); // cc
+ return this.validityPeriod;
+ }
+
+ public boolean hasValidityPeriod() {
+ return this.validityPeriod != null && !this.validityPeriod.isEmpty();
+ }
+
+ /**
+ * @param value {@link #validityPeriod} (This indicates the validity period of a prescription (stale dating the Prescription).)
+ */
+ public MedicationRequestDispenseRequestComponent setValidityPeriod(Period value) {
+ this.validityPeriod = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #numberOfRepeatsAllowed} (An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value
+ */
+ public UnsignedIntType getNumberOfRepeatsAllowedElement() {
+ if (this.numberOfRepeatsAllowed == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.numberOfRepeatsAllowed");
+ else if (Configuration.doAutoCreate())
+ this.numberOfRepeatsAllowed = new UnsignedIntType(); // bb
+ return this.numberOfRepeatsAllowed;
+ }
+
+ public boolean hasNumberOfRepeatsAllowedElement() {
+ return this.numberOfRepeatsAllowed != null && !this.numberOfRepeatsAllowed.isEmpty();
+ }
+
+ public boolean hasNumberOfRepeatsAllowed() {
+ return this.numberOfRepeatsAllowed != null && !this.numberOfRepeatsAllowed.isEmpty();
+ }
+
+ /**
+ * @param value {@link #numberOfRepeatsAllowed} (An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value
+ */
+ public MedicationRequestDispenseRequestComponent setNumberOfRepeatsAllowedElement(UnsignedIntType value) {
+ this.numberOfRepeatsAllowed = value;
+ return this;
+ }
+
+ /**
+ * @return An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.
+ */
+ public int getNumberOfRepeatsAllowed() {
+ return this.numberOfRepeatsAllowed == null || this.numberOfRepeatsAllowed.isEmpty() ? 0 : this.numberOfRepeatsAllowed.getValue();
+ }
+
+ /**
+ * @param value An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.
+ */
+ public MedicationRequestDispenseRequestComponent setNumberOfRepeatsAllowed(int value) {
+ if (this.numberOfRepeatsAllowed == null)
+ this.numberOfRepeatsAllowed = new UnsignedIntType();
+ this.numberOfRepeatsAllowed.setValue(value);
+ return this;
+ }
+
+ /**
+ * @return {@link #quantity} (The amount that is to be dispensed for one fill.)
+ */
+ public Quantity getQuantity() {
+ if (this.quantity == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.quantity");
+ else if (Configuration.doAutoCreate())
+ this.quantity = new Quantity(); // cc
+ return this.quantity;
+ }
+
+ public boolean hasQuantity() {
+ return this.quantity != null && !this.quantity.isEmpty();
+ }
+
+ /**
+ * @param value {@link #quantity} (The amount that is to be dispensed for one fill.)
+ */
+ public MedicationRequestDispenseRequestComponent setQuantity(Quantity value) {
+ this.quantity = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.)
+ */
+ public Duration getExpectedSupplyDuration() {
+ if (this.expectedSupplyDuration == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.expectedSupplyDuration");
+ else if (Configuration.doAutoCreate())
+ this.expectedSupplyDuration = new Duration(); // cc
+ return this.expectedSupplyDuration;
+ }
+
+ public boolean hasExpectedSupplyDuration() {
+ return this.expectedSupplyDuration != null && !this.expectedSupplyDuration.isEmpty();
+ }
+
+ /**
+ * @param value {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.)
+ */
+ public MedicationRequestDispenseRequestComponent setExpectedSupplyDuration(Duration value) {
+ this.expectedSupplyDuration = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #performer} (Indicates the intended dispensing Organization specified by the prescriber.)
+ */
+ public Reference getPerformer() {
+ if (this.performer == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.performer");
+ else if (Configuration.doAutoCreate())
+ this.performer = new Reference(); // cc
+ return this.performer;
+ }
+
+ public boolean hasPerformer() {
+ return this.performer != null && !this.performer.isEmpty();
+ }
+
+ /**
+ * @param value {@link #performer} (Indicates the intended dispensing Organization specified by the prescriber.)
+ */
+ public MedicationRequestDispenseRequestComponent setPerformer(Reference value) {
+ this.performer = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #performer} 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 intended dispensing Organization specified by the prescriber.)
+ */
+ public Organization getPerformerTarget() {
+ if (this.performerTarget == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.performer");
+ else if (Configuration.doAutoCreate())
+ this.performerTarget = new Organization(); // aa
+ return this.performerTarget;
+ }
+
+ /**
+ * @param value {@link #performer} 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 intended dispensing Organization specified by the prescriber.)
+ */
+ public MedicationRequestDispenseRequestComponent setPerformerTarget(Organization value) {
+ this.performerTarget = value;
+ return this;
+ }
+
+ protected void listChildren(List children) {
+ super.listChildren(children);
+ children.add(new Property("initialFill", "", "Indicates the quantity or duration for the first dispense of the medication.", 0, 1, initialFill));
+ children.add(new Property("dispenseInterval", "Duration", "The minimum period of time that must occur between dispenses of the medication.", 0, 1, dispenseInterval));
+ children.add(new Property("validityPeriod", "Period", "This indicates the validity period of a prescription (stale dating the Prescription).", 0, 1, validityPeriod));
+ children.add(new Property("numberOfRepeatsAllowed", "unsignedInt", "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", 0, 1, numberOfRepeatsAllowed));
+ children.add(new Property("quantity", "SimpleQuantity", "The amount that is to be dispensed for one fill.", 0, 1, quantity));
+ children.add(new Property("expectedSupplyDuration", "Duration", "Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.", 0, 1, expectedSupplyDuration));
+ children.add(new Property("performer", "Reference(Organization)", "Indicates the intended dispensing Organization specified by the prescriber.", 0, 1, performer));
+ }
+
+ @Override
+ public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
+ switch (_hash) {
+ case 1232961255: /*initialFill*/
+ return new Property("initialFill", "", "Indicates the quantity or duration for the first dispense of the medication.", 0, 1, initialFill);
+ case 757112130: /*dispenseInterval*/
+ return new Property("dispenseInterval", "Duration", "The minimum period of time that must occur between dispenses of the medication.", 0, 1, dispenseInterval);
+ case -1434195053: /*validityPeriod*/
+ return new Property("validityPeriod", "Period", "This indicates the validity period of a prescription (stale dating the Prescription).", 0, 1, validityPeriod);
+ case -239736976: /*numberOfRepeatsAllowed*/
+ return new Property("numberOfRepeatsAllowed", "unsignedInt", "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", 0, 1, numberOfRepeatsAllowed);
+ case -1285004149: /*quantity*/
+ return new Property("quantity", "SimpleQuantity", "The amount that is to be dispensed for one fill.", 0, 1, quantity);
+ case -1910182789: /*expectedSupplyDuration*/
+ return new Property("expectedSupplyDuration", "Duration", "Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.", 0, 1, expectedSupplyDuration);
+ case 481140686: /*performer*/
+ return new Property("performer", "Reference(Organization)", "Indicates the intended dispensing Organization specified by the prescriber.", 0, 1, performer);
+ default:
+ return super.getNamedProperty(_hash, _name, _checkValid);
}
- /**
- * @return {@link #initialFill} (Indicates the quantity or duration for the first dispense of the medication.)
- */
- public MedicationRequestDispenseRequestInitialFillComponent getInitialFill() {
- if (this.initialFill == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.initialFill");
- else if (Configuration.doAutoCreate())
- this.initialFill = new MedicationRequestDispenseRequestInitialFillComponent(); // cc
- return this.initialFill;
- }
-
- public boolean hasInitialFill() {
- return this.initialFill != null && !this.initialFill.isEmpty();
- }
-
- /**
- * @param value {@link #initialFill} (Indicates the quantity or duration for the first dispense of the medication.)
- */
- public MedicationRequestDispenseRequestComponent setInitialFill(MedicationRequestDispenseRequestInitialFillComponent value) {
- this.initialFill = value;
- return this;
- }
-
- /**
- * @return {@link #dispenseInterval} (The minimum period of time that must occur between dispenses of the medication.)
- */
- public Duration getDispenseInterval() {
- if (this.dispenseInterval == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.dispenseInterval");
- else if (Configuration.doAutoCreate())
- this.dispenseInterval = new Duration(); // cc
- return this.dispenseInterval;
- }
-
- public boolean hasDispenseInterval() {
- return this.dispenseInterval != null && !this.dispenseInterval.isEmpty();
- }
-
- /**
- * @param value {@link #dispenseInterval} (The minimum period of time that must occur between dispenses of the medication.)
- */
- public MedicationRequestDispenseRequestComponent setDispenseInterval(Duration value) {
- this.dispenseInterval = value;
- return this;
- }
-
- /**
- * @return {@link #validityPeriod} (This indicates the validity period of a prescription (stale dating the Prescription).)
- */
- public Period getValidityPeriod() {
- if (this.validityPeriod == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.validityPeriod");
- else if (Configuration.doAutoCreate())
- this.validityPeriod = new Period(); // cc
- return this.validityPeriod;
- }
-
- public boolean hasValidityPeriod() {
- return this.validityPeriod != null && !this.validityPeriod.isEmpty();
- }
-
- /**
- * @param value {@link #validityPeriod} (This indicates the validity period of a prescription (stale dating the Prescription).)
- */
- public MedicationRequestDispenseRequestComponent setValidityPeriod(Period value) {
- this.validityPeriod = value;
- return this;
- }
-
- /**
- * @return {@link #numberOfRepeatsAllowed} (An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value
- */
- public UnsignedIntType getNumberOfRepeatsAllowedElement() {
- if (this.numberOfRepeatsAllowed == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.numberOfRepeatsAllowed");
- else if (Configuration.doAutoCreate())
- this.numberOfRepeatsAllowed = new UnsignedIntType(); // bb
- return this.numberOfRepeatsAllowed;
- }
-
- public boolean hasNumberOfRepeatsAllowedElement() {
- return this.numberOfRepeatsAllowed != null && !this.numberOfRepeatsAllowed.isEmpty();
- }
-
- public boolean hasNumberOfRepeatsAllowed() {
- return this.numberOfRepeatsAllowed != null && !this.numberOfRepeatsAllowed.isEmpty();
- }
-
- /**
- * @param value {@link #numberOfRepeatsAllowed} (An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.). This is the underlying object with id, value and extensions. The accessor "getNumberOfRepeatsAllowed" gives direct access to the value
- */
- public MedicationRequestDispenseRequestComponent setNumberOfRepeatsAllowedElement(UnsignedIntType value) {
- this.numberOfRepeatsAllowed = value;
- return this;
- }
-
- /**
- * @return An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.
- */
- public int getNumberOfRepeatsAllowed() {
- return this.numberOfRepeatsAllowed == null || this.numberOfRepeatsAllowed.isEmpty() ? 0 : this.numberOfRepeatsAllowed.getValue();
- }
-
- /**
- * @param value An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.
- */
- public MedicationRequestDispenseRequestComponent setNumberOfRepeatsAllowed(int value) {
- if (this.numberOfRepeatsAllowed == null)
- this.numberOfRepeatsAllowed = new UnsignedIntType();
- this.numberOfRepeatsAllowed.setValue(value);
- return this;
- }
-
- /**
- * @return {@link #quantity} (The amount that is to be dispensed for one fill.)
- */
- public Quantity getQuantity() {
- if (this.quantity == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.quantity");
- else if (Configuration.doAutoCreate())
- this.quantity = new Quantity(); // cc
- return this.quantity;
- }
-
- public boolean hasQuantity() {
- return this.quantity != null && !this.quantity.isEmpty();
- }
-
- /**
- * @param value {@link #quantity} (The amount that is to be dispensed for one fill.)
- */
- public MedicationRequestDispenseRequestComponent setQuantity(Quantity value) {
- this.quantity = value;
- return this;
- }
-
- /**
- * @return {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.)
- */
- public Duration getExpectedSupplyDuration() {
- if (this.expectedSupplyDuration == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.expectedSupplyDuration");
- else if (Configuration.doAutoCreate())
- this.expectedSupplyDuration = new Duration(); // cc
- return this.expectedSupplyDuration;
- }
-
- public boolean hasExpectedSupplyDuration() {
- return this.expectedSupplyDuration != null && !this.expectedSupplyDuration.isEmpty();
- }
-
- /**
- * @param value {@link #expectedSupplyDuration} (Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.)
- */
- public MedicationRequestDispenseRequestComponent setExpectedSupplyDuration(Duration value) {
- this.expectedSupplyDuration = value;
- return this;
- }
-
- /**
- * @return {@link #performer} (Indicates the intended dispensing Organization specified by the prescriber.)
- */
- public Reference getPerformer() {
- if (this.performer == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.performer");
- else if (Configuration.doAutoCreate())
- this.performer = new Reference(); // cc
- return this.performer;
- }
-
- public boolean hasPerformer() {
- return this.performer != null && !this.performer.isEmpty();
- }
-
- /**
- * @param value {@link #performer} (Indicates the intended dispensing Organization specified by the prescriber.)
- */
- public MedicationRequestDispenseRequestComponent setPerformer(Reference value) {
- this.performer = value;
- return this;
- }
-
- /**
- * @return {@link #performer} 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 intended dispensing Organization specified by the prescriber.)
- */
- public Organization getPerformerTarget() {
- if (this.performerTarget == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestComponent.performer");
- else if (Configuration.doAutoCreate())
- this.performerTarget = new Organization(); // aa
- return this.performerTarget;
- }
-
- /**
- * @param value {@link #performer} 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 intended dispensing Organization specified by the prescriber.)
- */
- public MedicationRequestDispenseRequestComponent setPerformerTarget(Organization value) {
- this.performerTarget = value;
- return this;
- }
-
- protected void listChildren(List children) {
- super.listChildren(children);
- children.add(new Property("initialFill", "", "Indicates the quantity or duration for the first dispense of the medication.", 0, 1, initialFill));
- children.add(new Property("dispenseInterval", "Duration", "The minimum period of time that must occur between dispenses of the medication.", 0, 1, dispenseInterval));
- children.add(new Property("validityPeriod", "Period", "This indicates the validity period of a prescription (stale dating the Prescription).", 0, 1, validityPeriod));
- children.add(new Property("numberOfRepeatsAllowed", "unsignedInt", "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", 0, 1, numberOfRepeatsAllowed));
- children.add(new Property("quantity", "SimpleQuantity", "The amount that is to be dispensed for one fill.", 0, 1, quantity));
- children.add(new Property("expectedSupplyDuration", "Duration", "Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.", 0, 1, expectedSupplyDuration));
- children.add(new Property("performer", "Reference(Organization)", "Indicates the intended dispensing Organization specified by the prescriber.", 0, 1, performer));
- }
-
- @Override
- public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
- switch (_hash) {
- case 1232961255: /*initialFill*/ return new Property("initialFill", "", "Indicates the quantity or duration for the first dispense of the medication.", 0, 1, initialFill);
- case 757112130: /*dispenseInterval*/ return new Property("dispenseInterval", "Duration", "The minimum period of time that must occur between dispenses of the medication.", 0, 1, dispenseInterval);
- case -1434195053: /*validityPeriod*/ return new Property("validityPeriod", "Period", "This indicates the validity period of a prescription (stale dating the Prescription).", 0, 1, validityPeriod);
- case -239736976: /*numberOfRepeatsAllowed*/ return new Property("numberOfRepeatsAllowed", "unsignedInt", "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus \"3 repeats\", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", 0, 1, numberOfRepeatsAllowed);
- case -1285004149: /*quantity*/ return new Property("quantity", "SimpleQuantity", "The amount that is to be dispensed for one fill.", 0, 1, quantity);
- case -1910182789: /*expectedSupplyDuration*/ return new Property("expectedSupplyDuration", "Duration", "Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.", 0, 1, expectedSupplyDuration);
- case 481140686: /*performer*/ return new Property("performer", "Reference(Organization)", "Indicates the intended dispensing Organization specified by the prescriber.", 0, 1, performer);
- default: return super.getNamedProperty(_hash, _name, _checkValid);
- }
-
- }
-
- @Override
- public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
- switch (hash) {
- case 1232961255: /*initialFill*/ return this.initialFill == null ? new Base[0] : new Base[] {this.initialFill}; // MedicationRequestDispenseRequestInitialFillComponent
- case 757112130: /*dispenseInterval*/ return this.dispenseInterval == null ? new Base[0] : new Base[] {this.dispenseInterval}; // Duration
- case -1434195053: /*validityPeriod*/ return this.validityPeriod == null ? new Base[0] : new Base[] {this.validityPeriod}; // Period
- case -239736976: /*numberOfRepeatsAllowed*/ return this.numberOfRepeatsAllowed == null ? new Base[0] : new Base[] {this.numberOfRepeatsAllowed}; // UnsignedIntType
- case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
- case -1910182789: /*expectedSupplyDuration*/ return this.expectedSupplyDuration == null ? new Base[0] : new Base[] {this.expectedSupplyDuration}; // Duration
- case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
- default: return super.getProperty(hash, name, checkValid);
- }
+ }
+ @Override
+ public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
+ switch (hash) {
+ case 1232961255: /*initialFill*/
+ return this.initialFill == null ? new Base[0] : new Base[]{this.initialFill}; // MedicationRequestDispenseRequestInitialFillComponent
+ case 757112130: /*dispenseInterval*/
+ return this.dispenseInterval == null ? new Base[0] : new Base[]{this.dispenseInterval}; // Duration
+ case -1434195053: /*validityPeriod*/
+ return this.validityPeriod == null ? new Base[0] : new Base[]{this.validityPeriod}; // Period
+ case -239736976: /*numberOfRepeatsAllowed*/
+ return this.numberOfRepeatsAllowed == null ? new Base[0] : new Base[]{this.numberOfRepeatsAllowed}; // UnsignedIntType
+ case -1285004149: /*quantity*/
+ return this.quantity == null ? new Base[0] : new Base[]{this.quantity}; // Quantity
+ case -1910182789: /*expectedSupplyDuration*/
+ return this.expectedSupplyDuration == null ? new Base[0] : new Base[]{this.expectedSupplyDuration}; // Duration
+ case 481140686: /*performer*/
+ return this.performer == null ? new Base[0] : new Base[]{this.performer}; // Reference
+ default:
+ return super.getProperty(hash, name, checkValid);
}
- @Override
- public Base setProperty(int hash, String name, Base value) throws FHIRException {
- switch (hash) {
+ }
+
+ @Override
+ public Base setProperty(int hash, String name, Base value) throws FHIRException {
+ switch (hash) {
case 1232961255: // initialFill
this.initialFill = (MedicationRequestDispenseRequestInitialFillComponent) value; // MedicationRequestDispenseRequestInitialFillComponent
return value;
@@ -907,3067 +1040,3222 @@ public class MedicationRequest extends DomainResource {
case 481140686: // performer
this.performer = castToReference(value); // Reference
return value;
- default: return super.setProperty(hash, name, value);
- }
-
+ default:
+ return super.setProperty(hash, name, value);
}
- @Override
- public Base setProperty(String name, Base value) throws FHIRException {
- if (name.equals("initialFill")) {
- this.initialFill = (MedicationRequestDispenseRequestInitialFillComponent) value; // MedicationRequestDispenseRequestInitialFillComponent
- } else if (name.equals("dispenseInterval")) {
- this.dispenseInterval = castToDuration(value); // Duration
- } else if (name.equals("validityPeriod")) {
- this.validityPeriod = castToPeriod(value); // Period
- } else if (name.equals("numberOfRepeatsAllowed")) {
- this.numberOfRepeatsAllowed = castToUnsignedInt(value); // UnsignedIntType
- } else if (name.equals("quantity")) {
- this.quantity = castToQuantity(value); // Quantity
- } else if (name.equals("expectedSupplyDuration")) {
- this.expectedSupplyDuration = castToDuration(value); // Duration
- } else if (name.equals("performer")) {
- this.performer = castToReference(value); // Reference
- } else
- return super.setProperty(name, value);
- return value;
+ }
+
+ @Override
+ public Base setProperty(String name, Base value) throws FHIRException {
+ if (name.equals("initialFill")) {
+ this.initialFill = (MedicationRequestDispenseRequestInitialFillComponent) value; // MedicationRequestDispenseRequestInitialFillComponent
+ } else if (name.equals("dispenseInterval")) {
+ this.dispenseInterval = castToDuration(value); // Duration
+ } else if (name.equals("validityPeriod")) {
+ this.validityPeriod = castToPeriod(value); // Period
+ } else if (name.equals("numberOfRepeatsAllowed")) {
+ this.numberOfRepeatsAllowed = castToUnsignedInt(value); // UnsignedIntType
+ } else if (name.equals("quantity")) {
+ this.quantity = castToQuantity(value); // Quantity
+ } else if (name.equals("expectedSupplyDuration")) {
+ this.expectedSupplyDuration = castToDuration(value); // Duration
+ } else if (name.equals("performer")) {
+ this.performer = castToReference(value); // Reference
+ } else
+ return super.setProperty(name, value);
+ return value;
+ }
+
+ @Override
+ public Base makeProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ case 1232961255:
+ return getInitialFill();
+ case 757112130:
+ return getDispenseInterval();
+ case -1434195053:
+ return getValidityPeriod();
+ case -239736976:
+ return getNumberOfRepeatsAllowedElement();
+ case -1285004149:
+ return getQuantity();
+ case -1910182789:
+ return getExpectedSupplyDuration();
+ case 481140686:
+ return getPerformer();
+ default:
+ return super.makeProperty(hash, name);
}
- @Override
- public Base makeProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- case 1232961255: return getInitialFill();
- case 757112130: return getDispenseInterval();
- case -1434195053: return getValidityPeriod();
- case -239736976: return getNumberOfRepeatsAllowedElement();
- case -1285004149: return getQuantity();
- case -1910182789: return getExpectedSupplyDuration();
- case 481140686: return getPerformer();
- default: return super.makeProperty(hash, name);
- }
+ }
+ @Override
+ public String[] getTypesForProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ case 1232961255: /*initialFill*/
+ return new String[]{};
+ case 757112130: /*dispenseInterval*/
+ return new String[]{"Duration"};
+ case -1434195053: /*validityPeriod*/
+ return new String[]{"Period"};
+ case -239736976: /*numberOfRepeatsAllowed*/
+ return new String[]{"unsignedInt"};
+ case -1285004149: /*quantity*/
+ return new String[]{"SimpleQuantity"};
+ case -1910182789: /*expectedSupplyDuration*/
+ return new String[]{"Duration"};
+ case 481140686: /*performer*/
+ return new String[]{"Reference"};
+ default:
+ return super.getTypesForProperty(hash, name);
}
- @Override
- public String[] getTypesForProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- case 1232961255: /*initialFill*/ return new String[] {};
- case 757112130: /*dispenseInterval*/ return new String[] {"Duration"};
- case -1434195053: /*validityPeriod*/ return new String[] {"Period"};
- case -239736976: /*numberOfRepeatsAllowed*/ return new String[] {"unsignedInt"};
- case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"};
- case -1910182789: /*expectedSupplyDuration*/ return new String[] {"Duration"};
- case 481140686: /*performer*/ return new String[] {"Reference"};
- default: return super.getTypesForProperty(hash, name);
- }
+ }
- }
+ @Override
+ public Base addChild(String name) throws FHIRException {
+ if (name.equals("initialFill")) {
+ this.initialFill = new MedicationRequestDispenseRequestInitialFillComponent();
+ return this.initialFill;
+ } else if (name.equals("dispenseInterval")) {
+ this.dispenseInterval = new Duration();
+ return this.dispenseInterval;
+ } else if (name.equals("validityPeriod")) {
+ this.validityPeriod = new Period();
+ return this.validityPeriod;
+ } else if (name.equals("numberOfRepeatsAllowed")) {
+ throw new FHIRException("Cannot call addChild on a primitive type MedicationRequest.numberOfRepeatsAllowed");
+ } else if (name.equals("quantity")) {
+ this.quantity = new Quantity();
+ return this.quantity;
+ } else if (name.equals("expectedSupplyDuration")) {
+ this.expectedSupplyDuration = new Duration();
+ return this.expectedSupplyDuration;
+ } else if (name.equals("performer")) {
+ this.performer = new Reference();
+ return this.performer;
+ } else
+ return super.addChild(name);
+ }
- @Override
- public Base addChild(String name) throws FHIRException {
- if (name.equals("initialFill")) {
- this.initialFill = new MedicationRequestDispenseRequestInitialFillComponent();
- return this.initialFill;
- }
- else if (name.equals("dispenseInterval")) {
- this.dispenseInterval = new Duration();
- return this.dispenseInterval;
- }
- else if (name.equals("validityPeriod")) {
- this.validityPeriod = new Period();
- return this.validityPeriod;
- }
- else if (name.equals("numberOfRepeatsAllowed")) {
- throw new FHIRException("Cannot call addChild on a primitive type MedicationRequest.numberOfRepeatsAllowed");
- }
- else if (name.equals("quantity")) {
- this.quantity = new Quantity();
- return this.quantity;
- }
- else if (name.equals("expectedSupplyDuration")) {
- this.expectedSupplyDuration = new Duration();
- return this.expectedSupplyDuration;
- }
- else if (name.equals("performer")) {
- this.performer = new Reference();
- return this.performer;
- }
- else
- return super.addChild(name);
- }
+ public MedicationRequestDispenseRequestComponent copy() {
+ MedicationRequestDispenseRequestComponent dst = new MedicationRequestDispenseRequestComponent();
+ copyValues(dst);
+ dst.initialFill = initialFill == null ? null : initialFill.copy();
+ dst.dispenseInterval = dispenseInterval == null ? null : dispenseInterval.copy();
+ dst.validityPeriod = validityPeriod == null ? null : validityPeriod.copy();
+ dst.numberOfRepeatsAllowed = numberOfRepeatsAllowed == null ? null : numberOfRepeatsAllowed.copy();
+ dst.quantity = quantity == null ? null : quantity.copy();
+ dst.expectedSupplyDuration = expectedSupplyDuration == null ? null : expectedSupplyDuration.copy();
+ dst.performer = performer == null ? null : performer.copy();
+ return dst;
+ }
- public MedicationRequestDispenseRequestComponent copy() {
- MedicationRequestDispenseRequestComponent dst = new MedicationRequestDispenseRequestComponent();
- copyValues(dst);
- dst.initialFill = initialFill == null ? null : initialFill.copy();
- dst.dispenseInterval = dispenseInterval == null ? null : dispenseInterval.copy();
- dst.validityPeriod = validityPeriod == null ? null : validityPeriod.copy();
- dst.numberOfRepeatsAllowed = numberOfRepeatsAllowed == null ? null : numberOfRepeatsAllowed.copy();
- dst.quantity = quantity == null ? null : quantity.copy();
- dst.expectedSupplyDuration = expectedSupplyDuration == null ? null : expectedSupplyDuration.copy();
- dst.performer = performer == null ? null : performer.copy();
- return dst;
- }
+ @Override
+ public boolean equalsDeep(Base other_) {
+ if (!super.equalsDeep(other_))
+ return false;
+ if (!(other_ instanceof MedicationRequestDispenseRequestComponent))
+ return false;
+ MedicationRequestDispenseRequestComponent o = (MedicationRequestDispenseRequestComponent) other_;
+ return compareDeep(initialFill, o.initialFill, true) && compareDeep(dispenseInterval, o.dispenseInterval, true)
+ && compareDeep(validityPeriod, o.validityPeriod, true) && compareDeep(numberOfRepeatsAllowed, o.numberOfRepeatsAllowed, true)
+ && compareDeep(quantity, o.quantity, true) && compareDeep(expectedSupplyDuration, o.expectedSupplyDuration, true)
+ && compareDeep(performer, o.performer, true);
+ }
- @Override
- public boolean equalsDeep(Base other_) {
- if (!super.equalsDeep(other_))
- return false;
- if (!(other_ instanceof MedicationRequestDispenseRequestComponent))
- return false;
- MedicationRequestDispenseRequestComponent o = (MedicationRequestDispenseRequestComponent) other_;
- return compareDeep(initialFill, o.initialFill, true) && compareDeep(dispenseInterval, o.dispenseInterval, true)
- && compareDeep(validityPeriod, o.validityPeriod, true) && compareDeep(numberOfRepeatsAllowed, o.numberOfRepeatsAllowed, true)
- && compareDeep(quantity, o.quantity, true) && compareDeep(expectedSupplyDuration, o.expectedSupplyDuration, true)
- && compareDeep(performer, o.performer, true);
- }
+ @Override
+ public boolean equalsShallow(Base other_) {
+ if (!super.equalsShallow(other_))
+ return false;
+ if (!(other_ instanceof MedicationRequestDispenseRequestComponent))
+ return false;
+ MedicationRequestDispenseRequestComponent o = (MedicationRequestDispenseRequestComponent) other_;
+ return compareValues(numberOfRepeatsAllowed, o.numberOfRepeatsAllowed, true);
+ }
- @Override
- public boolean equalsShallow(Base other_) {
- if (!super.equalsShallow(other_))
- return false;
- if (!(other_ instanceof MedicationRequestDispenseRequestComponent))
- return false;
- MedicationRequestDispenseRequestComponent o = (MedicationRequestDispenseRequestComponent) other_;
- return compareValues(numberOfRepeatsAllowed, o.numberOfRepeatsAllowed, true);
- }
+ public boolean isEmpty() {
+ return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(initialFill, dispenseInterval
+ , validityPeriod, numberOfRepeatsAllowed, quantity, expectedSupplyDuration, performer
+ );
+ }
- public boolean isEmpty() {
- return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(initialFill, dispenseInterval
- , validityPeriod, numberOfRepeatsAllowed, quantity, expectedSupplyDuration, performer
- );
- }
+ public String fhirType() {
+ return "MedicationRequest.dispenseRequest";
- public String fhirType() {
- return "MedicationRequest.dispenseRequest";
+ }
}
- }
+ @Block()
+ public static class MedicationRequestDispenseRequestInitialFillComponent extends BackboneElement implements IBaseBackboneElement {
+ /**
+ * The amount or quantity to provide as part of the first dispense.
+ */
+ @Child(name = "quantity", type = {Quantity.class}, order = 1, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "First fill quantity", formalDefinition = "The amount or quantity to provide as part of the first dispense.")
+ protected Quantity quantity;
- @Block()
- public static class MedicationRequestDispenseRequestInitialFillComponent extends BackboneElement implements IBaseBackboneElement {
- /**
- * The amount or quantity to provide as part of the first dispense.
- */
- @Child(name = "quantity", type = {Quantity.class}, order=1, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="First fill quantity", formalDefinition="The amount or quantity to provide as part of the first dispense." )
- protected Quantity quantity;
+ /**
+ * The length of time that the first dispense is expected to last.
+ */
+ @Child(name = "duration", type = {Duration.class}, order = 2, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "First fill duration", formalDefinition = "The length of time that the first dispense is expected to last.")
+ protected Duration duration;
- /**
- * The length of time that the first dispense is expected to last.
- */
- @Child(name = "duration", type = {Duration.class}, order=2, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="First fill duration", formalDefinition="The length of time that the first dispense is expected to last." )
- protected Duration duration;
-
- private static final long serialVersionUID = 1223227956L;
+ private static final long serialVersionUID = 1223227956L;
/**
* Constructor
*/
- public MedicationRequestDispenseRequestInitialFillComponent() {
- super();
+ public MedicationRequestDispenseRequestInitialFillComponent() {
+ super();
+ }
+
+ /**
+ * @return {@link #quantity} (The amount or quantity to provide as part of the first dispense.)
+ */
+ public Quantity getQuantity() {
+ if (this.quantity == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestInitialFillComponent.quantity");
+ else if (Configuration.doAutoCreate())
+ this.quantity = new Quantity(); // cc
+ return this.quantity;
+ }
+
+ public boolean hasQuantity() {
+ return this.quantity != null && !this.quantity.isEmpty();
+ }
+
+ /**
+ * @param value {@link #quantity} (The amount or quantity to provide as part of the first dispense.)
+ */
+ public MedicationRequestDispenseRequestInitialFillComponent setQuantity(Quantity value) {
+ this.quantity = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #duration} (The length of time that the first dispense is expected to last.)
+ */
+ public Duration getDuration() {
+ if (this.duration == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestDispenseRequestInitialFillComponent.duration");
+ else if (Configuration.doAutoCreate())
+ this.duration = new Duration(); // cc
+ return this.duration;
+ }
+
+ public boolean hasDuration() {
+ return this.duration != null && !this.duration.isEmpty();
+ }
+
+ /**
+ * @param value {@link #duration} (The length of time that the first dispense is expected to last.)
+ */
+ public MedicationRequestDispenseRequestInitialFillComponent setDuration(Duration value) {
+ this.duration = value;
+ return this;
+ }
+
+ protected void listChildren(List children) {
+ super.listChildren(children);
+ children.add(new Property("quantity", "SimpleQuantity", "The amount or quantity to provide as part of the first dispense.", 0, 1, quantity));
+ children.add(new Property("duration", "Duration", "The length of time that the first dispense is expected to last.", 0, 1, duration));
+ }
+
+ @Override
+ public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
+ switch (_hash) {
+ case -1285004149: /*quantity*/
+ return new Property("quantity", "SimpleQuantity", "The amount or quantity to provide as part of the first dispense.", 0, 1, quantity);
+ case -1992012396: /*duration*/
+ return new Property("duration", "Duration", "The length of time that the first dispense is expected to last.", 0, 1, duration);
+ default:
+ return super.getNamedProperty(_hash, _name, _checkValid);
}
- /**
- * @return {@link #quantity} (The amount or quantity to provide as part of the first dispense.)
- */
- public Quantity getQuantity() {
- if (this.quantity == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestInitialFillComponent.quantity");
- else if (Configuration.doAutoCreate())
- this.quantity = new Quantity(); // cc
- return this.quantity;
- }
-
- public boolean hasQuantity() {
- return this.quantity != null && !this.quantity.isEmpty();
- }
-
- /**
- * @param value {@link #quantity} (The amount or quantity to provide as part of the first dispense.)
- */
- public MedicationRequestDispenseRequestInitialFillComponent setQuantity(Quantity value) {
- this.quantity = value;
- return this;
- }
-
- /**
- * @return {@link #duration} (The length of time that the first dispense is expected to last.)
- */
- public Duration getDuration() {
- if (this.duration == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestDispenseRequestInitialFillComponent.duration");
- else if (Configuration.doAutoCreate())
- this.duration = new Duration(); // cc
- return this.duration;
- }
-
- public boolean hasDuration() {
- return this.duration != null && !this.duration.isEmpty();
- }
-
- /**
- * @param value {@link #duration} (The length of time that the first dispense is expected to last.)
- */
- public MedicationRequestDispenseRequestInitialFillComponent setDuration(Duration value) {
- this.duration = value;
- return this;
- }
-
- protected void listChildren(List children) {
- super.listChildren(children);
- children.add(new Property("quantity", "SimpleQuantity", "The amount or quantity to provide as part of the first dispense.", 0, 1, quantity));
- children.add(new Property("duration", "Duration", "The length of time that the first dispense is expected to last.", 0, 1, duration));
- }
-
- @Override
- public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
- switch (_hash) {
- case -1285004149: /*quantity*/ return new Property("quantity", "SimpleQuantity", "The amount or quantity to provide as part of the first dispense.", 0, 1, quantity);
- case -1992012396: /*duration*/ return new Property("duration", "Duration", "The length of time that the first dispense is expected to last.", 0, 1, duration);
- default: return super.getNamedProperty(_hash, _name, _checkValid);
- }
-
- }
-
- @Override
- public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
- switch (hash) {
- case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
- case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // Duration
- default: return super.getProperty(hash, name, checkValid);
- }
+ }
+ @Override
+ public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
+ switch (hash) {
+ case -1285004149: /*quantity*/
+ return this.quantity == null ? new Base[0] : new Base[]{this.quantity}; // Quantity
+ case -1992012396: /*duration*/
+ return this.duration == null ? new Base[0] : new Base[]{this.duration}; // Duration
+ default:
+ return super.getProperty(hash, name, checkValid);
}
- @Override
- public Base setProperty(int hash, String name, Base value) throws FHIRException {
- switch (hash) {
+ }
+
+ @Override
+ public Base setProperty(int hash, String name, Base value) throws FHIRException {
+ switch (hash) {
case -1285004149: // quantity
this.quantity = castToQuantity(value); // Quantity
return value;
case -1992012396: // duration
this.duration = castToDuration(value); // Duration
return value;
- default: return super.setProperty(hash, name, value);
- }
-
+ default:
+ return super.setProperty(hash, name, value);
}
- @Override
- public Base setProperty(String name, Base value) throws FHIRException {
- if (name.equals("quantity")) {
- this.quantity = castToQuantity(value); // Quantity
- } else if (name.equals("duration")) {
- this.duration = castToDuration(value); // Duration
- } else
- return super.setProperty(name, value);
- return value;
+ }
+
+ @Override
+ public Base setProperty(String name, Base value) throws FHIRException {
+ if (name.equals("quantity")) {
+ this.quantity = castToQuantity(value); // Quantity
+ } else if (name.equals("duration")) {
+ this.duration = castToDuration(value); // Duration
+ } else
+ return super.setProperty(name, value);
+ return value;
+ }
+
+ @Override
+ public Base makeProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ case -1285004149:
+ return getQuantity();
+ case -1992012396:
+ return getDuration();
+ default:
+ return super.makeProperty(hash, name);
}
- @Override
- public Base makeProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- case -1285004149: return getQuantity();
- case -1992012396: return getDuration();
- default: return super.makeProperty(hash, name);
- }
+ }
+ @Override
+ public String[] getTypesForProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ case -1285004149: /*quantity*/
+ return new String[]{"SimpleQuantity"};
+ case -1992012396: /*duration*/
+ return new String[]{"Duration"};
+ default:
+ return super.getTypesForProperty(hash, name);
}
- @Override
- public String[] getTypesForProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"};
- case -1992012396: /*duration*/ return new String[] {"Duration"};
- default: return super.getTypesForProperty(hash, name);
- }
+ }
- }
+ @Override
+ public Base addChild(String name) throws FHIRException {
+ if (name.equals("quantity")) {
+ this.quantity = new Quantity();
+ return this.quantity;
+ } else if (name.equals("duration")) {
+ this.duration = new Duration();
+ return this.duration;
+ } else
+ return super.addChild(name);
+ }
- @Override
- public Base addChild(String name) throws FHIRException {
- if (name.equals("quantity")) {
- this.quantity = new Quantity();
- return this.quantity;
- }
- else if (name.equals("duration")) {
- this.duration = new Duration();
- return this.duration;
- }
- else
- return super.addChild(name);
- }
+ public MedicationRequestDispenseRequestInitialFillComponent copy() {
+ MedicationRequestDispenseRequestInitialFillComponent dst = new MedicationRequestDispenseRequestInitialFillComponent();
+ copyValues(dst);
+ dst.quantity = quantity == null ? null : quantity.copy();
+ dst.duration = duration == null ? null : duration.copy();
+ return dst;
+ }
- public MedicationRequestDispenseRequestInitialFillComponent copy() {
- MedicationRequestDispenseRequestInitialFillComponent dst = new MedicationRequestDispenseRequestInitialFillComponent();
- copyValues(dst);
- dst.quantity = quantity == null ? null : quantity.copy();
- dst.duration = duration == null ? null : duration.copy();
- return dst;
- }
+ @Override
+ public boolean equalsDeep(Base other_) {
+ if (!super.equalsDeep(other_))
+ return false;
+ if (!(other_ instanceof MedicationRequestDispenseRequestInitialFillComponent))
+ return false;
+ MedicationRequestDispenseRequestInitialFillComponent o = (MedicationRequestDispenseRequestInitialFillComponent) other_;
+ return compareDeep(quantity, o.quantity, true) && compareDeep(duration, o.duration, true);
+ }
- @Override
- public boolean equalsDeep(Base other_) {
- if (!super.equalsDeep(other_))
- return false;
- if (!(other_ instanceof MedicationRequestDispenseRequestInitialFillComponent))
- return false;
- MedicationRequestDispenseRequestInitialFillComponent o = (MedicationRequestDispenseRequestInitialFillComponent) other_;
- return compareDeep(quantity, o.quantity, true) && compareDeep(duration, o.duration, true);
- }
+ @Override
+ public boolean equalsShallow(Base other_) {
+ if (!super.equalsShallow(other_))
+ return false;
+ if (!(other_ instanceof MedicationRequestDispenseRequestInitialFillComponent))
+ return false;
+ MedicationRequestDispenseRequestInitialFillComponent o = (MedicationRequestDispenseRequestInitialFillComponent) other_;
+ return true;
+ }
- @Override
- public boolean equalsShallow(Base other_) {
- if (!super.equalsShallow(other_))
- return false;
- if (!(other_ instanceof MedicationRequestDispenseRequestInitialFillComponent))
- return false;
- MedicationRequestDispenseRequestInitialFillComponent o = (MedicationRequestDispenseRequestInitialFillComponent) other_;
- return true;
- }
+ public boolean isEmpty() {
+ return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(quantity, duration);
+ }
- public boolean isEmpty() {
- return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(quantity, duration);
- }
+ public String fhirType() {
+ return "MedicationRequest.dispenseRequest.initialFill";
- public String fhirType() {
- return "MedicationRequest.dispenseRequest.initialFill";
+ }
}
- }
+ @Block()
+ public static class MedicationRequestSubstitutionComponent extends BackboneElement implements IBaseBackboneElement {
+ /**
+ * True if the prescriber allows a different drug to be dispensed from what was prescribed.
+ */
+ @Child(name = "allowed", type = {BooleanType.class, CodeableConcept.class}, order = 1, min = 1, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Whether substitution is allowed or not", formalDefinition = "True if the prescriber allows a different drug to be dispensed from what was prescribed.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode")
+ protected Type allowed;
- @Block()
- public static class MedicationRequestSubstitutionComponent extends BackboneElement implements IBaseBackboneElement {
- /**
- * True if the prescriber allows a different drug to be dispensed from what was prescribed.
- */
- @Child(name = "allowed", type = {BooleanType.class, CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Whether substitution is allowed or not", formalDefinition="True if the prescriber allows a different drug to be dispensed from what was prescribed." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode")
- protected Type allowed;
+ /**
+ * Indicates the reason for the substitution, or why substitution must or must not be performed.
+ */
+ @Child(name = "reason", type = {CodeableConcept.class}, order = 2, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Why should (not) substitution be made", formalDefinition = "Indicates the reason for the substitution, or why substitution must or must not be performed.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason")
+ protected CodeableConcept reason;
- /**
- * Indicates the reason for the substitution, or why substitution must or must not be performed.
- */
- @Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Why should (not) substitution be made", formalDefinition="Indicates the reason for the substitution, or why substitution must or must not be performed." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason")
- protected CodeableConcept reason;
-
- private static final long serialVersionUID = 547265407L;
+ private static final long serialVersionUID = 547265407L;
/**
* Constructor
*/
- public MedicationRequestSubstitutionComponent() {
- super();
- }
+ public MedicationRequestSubstitutionComponent() {
+ super();
+ }
/**
* Constructor
*/
- public MedicationRequestSubstitutionComponent(Type allowed) {
- super();
- this.allowed = allowed;
+ public MedicationRequestSubstitutionComponent(Type allowed) {
+ super();
+ this.allowed = allowed;
+ }
+
+ /**
+ * @return {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
+ */
+ public Type getAllowed() {
+ return this.allowed;
+ }
+
+ /**
+ * @return {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
+ */
+ public BooleanType getAllowedBooleanType() throws FHIRException {
+ if (this.allowed == null)
+ this.allowed = new BooleanType();
+ if (!(this.allowed instanceof BooleanType))
+ throw new FHIRException("Type mismatch: the type BooleanType was expected, but " + this.allowed.getClass().getName() + " was encountered");
+ return (BooleanType) this.allowed;
+ }
+
+ public boolean hasAllowedBooleanType() {
+ return this != null && this.allowed instanceof BooleanType;
+ }
+
+ /**
+ * @return {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
+ */
+ public CodeableConcept getAllowedCodeableConcept() throws FHIRException {
+ if (this.allowed == null)
+ this.allowed = new CodeableConcept();
+ if (!(this.allowed instanceof CodeableConcept))
+ throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but " + this.allowed.getClass().getName() + " was encountered");
+ return (CodeableConcept) this.allowed;
+ }
+
+ public boolean hasAllowedCodeableConcept() {
+ return this != null && this.allowed instanceof CodeableConcept;
+ }
+
+ public boolean hasAllowed() {
+ return this.allowed != null && !this.allowed.isEmpty();
+ }
+
+ /**
+ * @param value {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
+ */
+ public MedicationRequestSubstitutionComponent setAllowed(Type value) {
+ if (value != null && !(value instanceof BooleanType || value instanceof CodeableConcept))
+ throw new Error("Not the right type for MedicationRequest.substitution.allowed[x]: " + value.fhirType());
+ this.allowed = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #reason} (Indicates the reason for the substitution, or why substitution must or must not be performed.)
+ */
+ public CodeableConcept getReason() {
+ if (this.reason == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequestSubstitutionComponent.reason");
+ else if (Configuration.doAutoCreate())
+ this.reason = new CodeableConcept(); // cc
+ return this.reason;
+ }
+
+ public boolean hasReason() {
+ return this.reason != null && !this.reason.isEmpty();
+ }
+
+ /**
+ * @param value {@link #reason} (Indicates the reason for the substitution, or why substitution must or must not be performed.)
+ */
+ public MedicationRequestSubstitutionComponent setReason(CodeableConcept value) {
+ this.reason = value;
+ return this;
+ }
+
+ protected void listChildren(List children) {
+ super.listChildren(children);
+ children.add(new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed));
+ children.add(new Property("reason", "CodeableConcept", "Indicates the reason for the substitution, or why substitution must or must not be performed.", 0, 1, reason));
+ }
+
+ @Override
+ public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
+ switch (_hash) {
+ case -1336663592: /*allowed[x]*/
+ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
+ case -911343192: /*allowed*/
+ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
+ case 177755488: /*allowedBoolean*/
+ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
+ case 963125465: /*allowedCodeableConcept*/
+ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
+ case -934964668: /*reason*/
+ return new Property("reason", "CodeableConcept", "Indicates the reason for the substitution, or why substitution must or must not be performed.", 0, 1, reason);
+ default:
+ return super.getNamedProperty(_hash, _name, _checkValid);
}
- /**
- * @return {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
- */
- public Type getAllowed() {
- return this.allowed;
- }
-
- /**
- * @return {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
- */
- public BooleanType getAllowedBooleanType() throws FHIRException {
- if (this.allowed == null)
- this.allowed = new BooleanType();
- if (!(this.allowed instanceof BooleanType))
- throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.allowed.getClass().getName()+" was encountered");
- return (BooleanType) this.allowed;
- }
-
- public boolean hasAllowedBooleanType() {
- return this != null && this.allowed instanceof BooleanType;
- }
-
- /**
- * @return {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
- */
- public CodeableConcept getAllowedCodeableConcept() throws FHIRException {
- if (this.allowed == null)
- this.allowed = new CodeableConcept();
- if (!(this.allowed instanceof CodeableConcept))
- throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.allowed.getClass().getName()+" was encountered");
- return (CodeableConcept) this.allowed;
- }
-
- public boolean hasAllowedCodeableConcept() {
- return this != null && this.allowed instanceof CodeableConcept;
- }
-
- public boolean hasAllowed() {
- return this.allowed != null && !this.allowed.isEmpty();
- }
-
- /**
- * @param value {@link #allowed} (True if the prescriber allows a different drug to be dispensed from what was prescribed.)
- */
- public MedicationRequestSubstitutionComponent setAllowed(Type value) {
- if (value != null && !(value instanceof BooleanType || value instanceof CodeableConcept))
- throw new Error("Not the right type for MedicationRequest.substitution.allowed[x]: "+value.fhirType());
- this.allowed = value;
- return this;
- }
-
- /**
- * @return {@link #reason} (Indicates the reason for the substitution, or why substitution must or must not be performed.)
- */
- public CodeableConcept getReason() {
- if (this.reason == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequestSubstitutionComponent.reason");
- else if (Configuration.doAutoCreate())
- this.reason = new CodeableConcept(); // cc
- return this.reason;
- }
-
- public boolean hasReason() {
- return this.reason != null && !this.reason.isEmpty();
- }
-
- /**
- * @param value {@link #reason} (Indicates the reason for the substitution, or why substitution must or must not be performed.)
- */
- public MedicationRequestSubstitutionComponent setReason(CodeableConcept value) {
- this.reason = value;
- return this;
- }
-
- protected void listChildren(List children) {
- super.listChildren(children);
- children.add(new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed));
- children.add(new Property("reason", "CodeableConcept", "Indicates the reason for the substitution, or why substitution must or must not be performed.", 0, 1, reason));
- }
-
- @Override
- public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
- switch (_hash) {
- case -1336663592: /*allowed[x]*/ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
- case -911343192: /*allowed*/ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
- case 177755488: /*allowedBoolean*/ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
- case 963125465: /*allowedCodeableConcept*/ return new Property("allowed[x]", "boolean|CodeableConcept", "True if the prescriber allows a different drug to be dispensed from what was prescribed.", 0, 1, allowed);
- case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "Indicates the reason for the substitution, or why substitution must or must not be performed.", 0, 1, reason);
- default: return super.getNamedProperty(_hash, _name, _checkValid);
- }
-
- }
-
- @Override
- public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
- switch (hash) {
- case -911343192: /*allowed*/ return this.allowed == null ? new Base[0] : new Base[] {this.allowed}; // Type
- case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept
- default: return super.getProperty(hash, name, checkValid);
- }
+ }
+ @Override
+ public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
+ switch (hash) {
+ case -911343192: /*allowed*/
+ return this.allowed == null ? new Base[0] : new Base[]{this.allowed}; // Type
+ case -934964668: /*reason*/
+ return this.reason == null ? new Base[0] : new Base[]{this.reason}; // CodeableConcept
+ default:
+ return super.getProperty(hash, name, checkValid);
}
- @Override
- public Base setProperty(int hash, String name, Base value) throws FHIRException {
- switch (hash) {
+ }
+
+ @Override
+ public Base setProperty(int hash, String name, Base value) throws FHIRException {
+ switch (hash) {
case -911343192: // allowed
this.allowed = castToType(value); // Type
return value;
case -934964668: // reason
this.reason = castToCodeableConcept(value); // CodeableConcept
return value;
- default: return super.setProperty(hash, name, value);
- }
-
+ default:
+ return super.setProperty(hash, name, value);
}
- @Override
- public Base setProperty(String name, Base value) throws FHIRException {
- if (name.equals("allowed[x]")) {
- this.allowed = castToType(value); // Type
- } else if (name.equals("reason")) {
- this.reason = castToCodeableConcept(value); // CodeableConcept
- } else
- return super.setProperty(name, value);
- return value;
+ }
+
+ @Override
+ public Base setProperty(String name, Base value) throws FHIRException {
+ if (name.equals("allowed[x]")) {
+ this.allowed = castToType(value); // Type
+ } else if (name.equals("reason")) {
+ this.reason = castToCodeableConcept(value); // CodeableConcept
+ } else
+ return super.setProperty(name, value);
+ return value;
+ }
+
+ @Override
+ public Base makeProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ case -1336663592:
+ return getAllowed();
+ case -911343192:
+ return getAllowed();
+ case -934964668:
+ return getReason();
+ default:
+ return super.makeProperty(hash, name);
}
- @Override
- public Base makeProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- case -1336663592: return getAllowed();
- case -911343192: return getAllowed();
- case -934964668: return getReason();
- default: return super.makeProperty(hash, name);
- }
+ }
+ @Override
+ public String[] getTypesForProperty(int hash, String name) throws FHIRException {
+ switch (hash) {
+ case -911343192: /*allowed*/
+ return new String[]{"boolean", "CodeableConcept"};
+ case -934964668: /*reason*/
+ return new String[]{"CodeableConcept"};
+ default:
+ return super.getTypesForProperty(hash, name);
}
- @Override
- public String[] getTypesForProperty(int hash, String name) throws FHIRException {
- switch (hash) {
- case -911343192: /*allowed*/ return new String[] {"boolean", "CodeableConcept"};
- case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
- default: return super.getTypesForProperty(hash, name);
- }
+ }
- }
+ @Override
+ public Base addChild(String name) throws FHIRException {
+ if (name.equals("allowedBoolean")) {
+ this.allowed = new BooleanType();
+ return this.allowed;
+ } else if (name.equals("allowedCodeableConcept")) {
+ this.allowed = new CodeableConcept();
+ return this.allowed;
+ } else if (name.equals("reason")) {
+ this.reason = new CodeableConcept();
+ return this.reason;
+ } else
+ return super.addChild(name);
+ }
- @Override
- public Base addChild(String name) throws FHIRException {
- if (name.equals("allowedBoolean")) {
- this.allowed = new BooleanType();
- return this.allowed;
- }
- else if (name.equals("allowedCodeableConcept")) {
- this.allowed = new CodeableConcept();
- return this.allowed;
- }
- else if (name.equals("reason")) {
- this.reason = new CodeableConcept();
- return this.reason;
- }
- else
- return super.addChild(name);
- }
+ public MedicationRequestSubstitutionComponent copy() {
+ MedicationRequestSubstitutionComponent dst = new MedicationRequestSubstitutionComponent();
+ copyValues(dst);
+ dst.allowed = allowed == null ? null : allowed.copy();
+ dst.reason = reason == null ? null : reason.copy();
+ return dst;
+ }
- public MedicationRequestSubstitutionComponent copy() {
- MedicationRequestSubstitutionComponent dst = new MedicationRequestSubstitutionComponent();
- copyValues(dst);
- dst.allowed = allowed == null ? null : allowed.copy();
- dst.reason = reason == null ? null : reason.copy();
- return dst;
- }
+ @Override
+ public boolean equalsDeep(Base other_) {
+ if (!super.equalsDeep(other_))
+ return false;
+ if (!(other_ instanceof MedicationRequestSubstitutionComponent))
+ return false;
+ MedicationRequestSubstitutionComponent o = (MedicationRequestSubstitutionComponent) other_;
+ return compareDeep(allowed, o.allowed, true) && compareDeep(reason, o.reason, true);
+ }
- @Override
- public boolean equalsDeep(Base other_) {
- if (!super.equalsDeep(other_))
- return false;
- if (!(other_ instanceof MedicationRequestSubstitutionComponent))
- return false;
- MedicationRequestSubstitutionComponent o = (MedicationRequestSubstitutionComponent) other_;
- return compareDeep(allowed, o.allowed, true) && compareDeep(reason, o.reason, true);
- }
+ @Override
+ public boolean equalsShallow(Base other_) {
+ if (!super.equalsShallow(other_))
+ return false;
+ if (!(other_ instanceof MedicationRequestSubstitutionComponent))
+ return false;
+ MedicationRequestSubstitutionComponent o = (MedicationRequestSubstitutionComponent) other_;
+ return true;
+ }
- @Override
- public boolean equalsShallow(Base other_) {
- if (!super.equalsShallow(other_))
- return false;
- if (!(other_ instanceof MedicationRequestSubstitutionComponent))
- return false;
- MedicationRequestSubstitutionComponent o = (MedicationRequestSubstitutionComponent) other_;
+ public boolean isEmpty() {
+ return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(allowed, reason);
+ }
+
+ public String fhirType() {
+ return "MedicationRequest.substitution";
+
+ }
+
+ }
+
+ /**
+ * Identifiers associated with this medication request 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.
+ */
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "External ids for this request", formalDefinition = "Identifiers associated with this medication request 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.")
+ protected List identifier;
+
+ /**
+ * A code specifying the current state of the order. Generally, this will be active or completed state.
+ */
+ @Child(name = "status", type = {CodeType.class}, order = 1, min = 1, max = 1, modifier = true, summary = true)
+ @Description(shortDefinition = "active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown", formalDefinition = "A code specifying the current state of the order. Generally, this will be active or completed state.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medicationrequest-status")
+ protected Enumeration status;
+
+ /**
+ * Captures the reason for the current state of the MedicationRequest.
+ */
+ @Child(name = "statusReason", type = {CodeableConcept.class}, order = 2, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Reason for current status", formalDefinition = "Captures the reason for the current state of the MedicationRequest.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medicationrequest-status-reason")
+ protected CodeableConcept statusReason;
+
+ /**
+ * Whether the request is a proposal, plan, or an original order.
+ */
+ @Child(name = "intent", type = {CodeType.class}, order = 3, min = 1, max = 1, modifier = true, summary = true)
+ @Description(shortDefinition = "proposal | plan | order | original-order | instance-order | option", formalDefinition = "Whether the request is a proposal, plan, or an original order.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medicationrequest-intent")
+ protected Enumeration intent;
+
+ /**
+ * Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).
+ */
+ @Child(name = "category", type = {CodeableConcept.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "Type of medication usage", formalDefinition = "Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medicationrequest-category")
+ protected List category;
+
+ /**
+ * Indicates how quickly the Medication Request should be addressed with respect to other requests.
+ */
+ @Child(name = "priority", type = {CodeType.class}, order = 5, min = 0, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "routine | urgent | asap | stat", formalDefinition = "Indicates how quickly the Medication Request should be addressed with respect to other requests.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/request-priority")
+ protected Enumeration priority;
+
+ /**
+ * If true indicates that the provider is asking for the medication request not to occur.
+ */
+ @Child(name = "doNotPerform", type = {BooleanType.class}, order = 6, min = 0, max = 1, modifier = true, summary = true)
+ @Description(shortDefinition = "True if request is prohibiting action", formalDefinition = "If true indicates that the provider is asking for the medication request not to occur.")
+ protected BooleanType doNotPerform;
+
+ /**
+ * Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.
+ */
+ @Child(name = "reported", type = {BooleanType.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Organization.class}, order = 7, min = 0, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "Reported rather than primary record", formalDefinition = "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.")
+ protected Type reported;
+
+ /**
+ * Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.
+ */
+ @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order = 8, min = 1, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "Medication to be taken", formalDefinition = "Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medication-codes")
+ protected Type medication;
+
+ /**
+ * A link to a resource representing the person or set of individuals to whom the medication will be given.
+ */
+ @Child(name = "subject", type = {Patient.class, Group.class}, order = 9, min = 1, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "Who or group medication request is for", formalDefinition = "A link to a resource representing the person or set of individuals to whom the medication will be given.")
+ protected Reference subject;
+
+ /**
+ * The actual object that is the target of the reference (A link to a resource representing the person or set of individuals to whom the medication will be given.)
+ */
+ protected Resource subjectTarget;
+
+ /**
+ * The Encounter during which this [x] was created or to which the creation of this record is tightly associated.
+ */
+ @Child(name = "encounter", type = {Encounter.class}, order = 10, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Encounter created as part of encounter/admission/stay", formalDefinition = "The Encounter during which this [x] was created or to which the creation of this record is tightly associated.")
+ protected Reference encounter;
+
+ /**
+ * The actual object that is the target of the reference (The Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
+ */
+ protected Encounter encounterTarget;
+
+ /**
+ * Include additional information (for example, patient height and weight) that supports the ordering of the medication.
+ */
+ @Child(name = "supportingInformation", type = {Reference.class}, order = 11, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "Information to support ordering of the medication", formalDefinition = "Include additional information (for example, patient height and weight) that supports the ordering of the medication.")
+ protected List supportingInformation;
+ /**
+ * The actual objects that are the target of the reference (Include additional information (for example, patient height and weight) that supports the ordering of the medication.)
+ */
+ protected List supportingInformationTarget;
+
+
+ /**
+ * The date (and perhaps time) when the prescription was initially written or authored on.
+ */
+ @Child(name = "authoredOn", type = {DateTimeType.class}, order = 12, min = 0, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "When request was initially authored", formalDefinition = "The date (and perhaps time) when the prescription was initially written or authored on.")
+ protected DateTimeType authoredOn;
+
+ /**
+ * The individual, organization, or device that initiated the request and has responsibility for its activation.
+ */
+ @Child(name = "requester", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class, Device.class}, order = 13, min = 0, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "Who/What requested the Request", formalDefinition = "The individual, organization, or device that initiated the request and has responsibility for its activation.")
+ protected Reference requester;
+
+ /**
+ * The actual object that is the target of the reference (The individual, organization, or device that initiated the request and has responsibility for its activation.)
+ */
+ protected Resource requesterTarget;
+
+ /**
+ * The specified desired performer of the medication treatment (e.g. the performer of the medication administration).
+ */
+ @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, Device.class, RelatedPerson.class, CareTeam.class}, order = 14, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Intended performer of administration", formalDefinition = "The specified desired performer of the medication treatment (e.g. the performer of the medication administration).")
+ protected Reference performer;
+
+ /**
+ * The actual object that is the target of the reference (The specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
+ */
+ protected Resource performerTarget;
+
+ /**
+ * Indicates the type of performer of the administration of the medication.
+ */
+ @Child(name = "performerType", type = {CodeableConcept.class}, order = 15, min = 0, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "Desired kind of performer of the medication administration", formalDefinition = "Indicates the type of performer of the administration of the medication.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/performer-role")
+ protected CodeableConcept performerType;
+
+ /**
+ * The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.
+ */
+ @Child(name = "recorder", type = {Practitioner.class, PractitionerRole.class}, order = 16, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Person who entered the request", formalDefinition = "The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.")
+ protected Reference recorder;
+
+ /**
+ * The actual object that is the target of the reference (The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
+ */
+ protected Resource recorderTarget;
+
+ /**
+ * The reason or the indication for ordering or not ordering the medication.
+ */
+ @Child(name = "reasonCode", type = {CodeableConcept.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "Reason or indication for ordering or not ordering the medication", formalDefinition = "The reason or the indication for ordering or not ordering the medication.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/condition-code")
+ protected List reasonCode;
+
+ /**
+ * Condition or observation that supports why the medication was ordered.
+ */
+ @Child(name = "reasonReference", type = {Condition.class, Observation.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "Condition or observation that supports why the prescription is being written", formalDefinition = "Condition or observation that supports why the medication was ordered.")
+ protected List reasonReference;
+ /**
+ * The actual objects that are the target of the reference (Condition or observation that supports why the medication was ordered.)
+ */
+ protected List reasonReferenceTarget;
+
+
+ /**
+ * The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.
+ */
+ @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order = 19, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true)
+ @Description(shortDefinition = "Instantiates FHIR protocol or definition", formalDefinition = "The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.")
+ protected List instantiatesCanonical;
+
+ /**
+ * The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.
+ */
+ @Child(name = "instantiatesUri", type = {UriType.class}, order = 20, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true)
+ @Description(shortDefinition = "Instantiates external protocol or definition", formalDefinition = "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.")
+ protected List instantiatesUri;
+
+ /**
+ * A plan or request that is fulfilled in whole or in part by this medication request.
+ */
+ @Child(name = "basedOn", type = {CarePlan.class, MedicationRequest.class, ServiceRequest.class, ImmunizationRecommendation.class}, order = 21, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true)
+ @Description(shortDefinition = "What request fulfills", formalDefinition = "A plan or request that is fulfilled in whole or in part by this medication request.")
+ protected List basedOn;
+ /**
+ * The actual objects that are the target of the reference (A plan or request that is fulfilled in whole or in part by this medication request.)
+ */
+ protected List basedOnTarget;
+
+
+ /**
+ * A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.
+ */
+ @Child(name = "groupIdentifier", type = {Identifier.class}, order = 22, min = 0, max = 1, modifier = false, summary = true)
+ @Description(shortDefinition = "Composite request this is part of", formalDefinition = "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.")
+ protected Identifier groupIdentifier;
+
+ /**
+ * The description of the overall patte3rn of the administration of the medication to the patient.
+ */
+ @Child(name = "courseOfTherapyType", type = {CodeableConcept.class}, order = 23, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Overall pattern of medication administration", formalDefinition = "The description of the overall patte3rn of the administration of the medication to the patient.")
+ @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy")
+ protected CodeableConcept courseOfTherapyType;
+
+ /**
+ * Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.
+ */
+ @Child(name = "insurance", type = {Coverage.class, ClaimResponse.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "Associated insurance coverage", formalDefinition = "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.")
+ protected List insurance;
+ /**
+ * The actual objects that are the target of the reference (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.)
+ */
+ protected List insuranceTarget;
+
+
+ /**
+ * Extra information about the prescription that could not be conveyed by the other attributes.
+ */
+ @Child(name = "note", type = {Annotation.class}, order = 25, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "Information about the prescription", formalDefinition = "Extra information about the prescription that could not be conveyed by the other attributes.")
+ protected List note;
+
+ /**
+ * Indicates how the medication is to be used by the patient.
+ */
+ @Child(name = "dosageInstruction", type = {Dosage.class}, order = 26, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "How the medication should be taken", formalDefinition = "Indicates how the medication is to be used by the patient.")
+ protected List dosageInstruction;
+
+ /**
+ * Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.
+ */
+ @Child(name = "dispenseRequest", type = {}, order = 27, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Medication supply authorization", formalDefinition = "Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.")
+ protected MedicationRequestDispenseRequestComponent dispenseRequest;
+
+ /**
+ * Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.
+ */
+ @Child(name = "substitution", type = {}, order = 28, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "Any restrictions on medication substitution", formalDefinition = "Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.")
+ protected MedicationRequestSubstitutionComponent substitution;
+
+ /**
+ * A link to a resource representing an earlier order related order or prescription.
+ */
+ @Child(name = "priorPrescription", type = {MedicationRequest.class}, order = 29, min = 0, max = 1, modifier = false, summary = false)
+ @Description(shortDefinition = "An order/prescription that is being replaced", formalDefinition = "A link to a resource representing an earlier order related order or prescription.")
+ protected Reference priorPrescription;
+
+ /**
+ * The actual object that is the target of the reference (A link to a resource representing an earlier order related order or prescription.)
+ */
+ protected MedicationRequest priorPrescriptionTarget;
+
+ /**
+ * 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, duplicate therapy, dosage alert etc.
+ */
+ @Child(name = "detectedIssue", type = {DetectedIssue.class}, order = 30, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "Clinical Issue with action", formalDefinition = "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, duplicate therapy, dosage alert etc.")
+ protected List detectedIssue;
+ /**
+ * The actual objects that are the target of the reference (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, duplicate therapy, dosage alert etc.)
+ */
+ protected List detectedIssueTarget;
+
+
+ /**
+ * Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.
+ */
+ @Child(name = "eventHistory", type = {Provenance.class}, order = 31, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
+ @Description(shortDefinition = "A list of events of interest in the lifecycle", formalDefinition = "Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.")
+ protected List eventHistory;
+ /**
+ * The actual objects that are the target of the reference (Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.)
+ */
+ protected List eventHistoryTarget;
+
+
+ private static final long serialVersionUID = 1313900480L;
+
+ /**
+ * Constructor
+ */
+ public MedicationRequest() {
+ super();
+ }
+
+ /**
+ * Constructor
+ */
+ public MedicationRequest(Enumeration status, Enumeration intent, Type medication, Reference subject) {
+ super();
+ this.status = status;
+ this.intent = intent;
+ this.medication = medication;
+ this.subject = subject;
+ }
+
+ /**
+ * @return {@link #identifier} (Identifiers associated with this medication request 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.)
+ */
+ public List getIdentifier() {
+ if (this.identifier == null)
+ this.identifier = new ArrayList();
+ return this.identifier;
+ }
+
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setIdentifier(List theIdentifier) {
+ this.identifier = theIdentifier;
+ return this;
+ }
+
+ public boolean hasIdentifier() {
+ if (this.identifier == null)
+ return false;
+ for (Identifier item : this.identifier)
+ if (!item.isEmpty())
return true;
- }
-
- public boolean isEmpty() {
- return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(allowed, reason);
- }
-
- public String fhirType() {
- return "MedicationRequest.substitution";
-
+ return false;
}
+ public Identifier addIdentifier() { //3
+ Identifier t = new Identifier();
+ if (this.identifier == null)
+ this.identifier = new ArrayList();
+ this.identifier.add(t);
+ return t;
}
- /**
- * Identifiers associated with this medication request 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.
- */
- @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="External ids for this request", formalDefinition="Identifiers associated with this medication request 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." )
- protected List identifier;
-
- /**
- * A code specifying the current state of the order. Generally, this will be active or completed state.
- */
- @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
- @Description(shortDefinition="active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown", formalDefinition="A code specifying the current state of the order. Generally, this will be active or completed state." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medicationrequest-status")
- protected Enumeration status;
-
- /**
- * Captures the reason for the current state of the MedicationRequest.
- */
- @Child(name = "statusReason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current state of the MedicationRequest." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medicationrequest-status-reason")
- protected CodeableConcept statusReason;
-
- /**
- * Whether the request is a proposal, plan, or an original order.
- */
- @Child(name = "intent", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true)
- @Description(shortDefinition="proposal | plan | order | original-order | instance-order | option", formalDefinition="Whether the request is a proposal, plan, or an original order." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medicationrequest-intent")
- protected Enumeration intent;
-
- /**
- * Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).
- */
- @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="Type of medication usage", formalDefinition="Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medicationrequest-category")
- protected List category;
-
- /**
- * Indicates how quickly the Medication Request should be addressed with respect to other requests.
- */
- @Child(name = "priority", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
- @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the Medication Request should be addressed with respect to other requests." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
- protected Enumeration priority;
-
- /**
- * If true indicates that the provider is asking for the medication request not to occur.
- */
- @Child(name = "doNotPerform", type = {BooleanType.class}, order=6, min=0, max=1, modifier=true, summary=true)
- @Description(shortDefinition="True if request is prohibiting action", formalDefinition="If true indicates that the provider is asking for the medication request not to occur." )
- protected BooleanType doNotPerform;
-
- /**
- * Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.
- */
- @Child(name = "reported", type = {BooleanType.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true)
- @Description(shortDefinition="Reported rather than primary record", formalDefinition="Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report." )
- protected Type reported;
-
- /**
- * Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.
- */
- @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order=8, min=1, max=1, modifier=false, summary=true)
- @Description(shortDefinition="Medication to be taken", formalDefinition="Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes")
- protected Type medication;
-
- /**
- * A link to a resource representing the person or set of individuals to whom the medication will be given.
- */
- @Child(name = "subject", type = {Patient.class, Group.class}, order=9, min=1, max=1, modifier=false, summary=true)
- @Description(shortDefinition="Who or group medication request is for", formalDefinition="A link to a resource representing the person or set of individuals to whom the medication will be given." )
- protected Reference subject;
-
- /**
- * The actual object that is the target of the reference (A link to a resource representing the person or set of individuals to whom the medication will be given.)
- */
- protected Resource subjectTarget;
-
- /**
- * The Encounter during which this [x] was created or to which the creation of this record is tightly associated.
- */
- @Child(name = "encounter", type = {Encounter.class}, order=10, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Encounter created as part of encounter/admission/stay", formalDefinition="The Encounter during which this [x] was created or to which the creation of this record is tightly associated." )
- protected Reference encounter;
-
- /**
- * The actual object that is the target of the reference (The Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
- */
- protected Encounter encounterTarget;
-
- /**
- * Include additional information (for example, patient height and weight) that supports the ordering of the medication.
- */
- @Child(name = "supportingInformation", type = {Reference.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="Information to support ordering of the medication", formalDefinition="Include additional information (for example, patient height and weight) that supports the ordering of the medication." )
- protected List supportingInformation;
- /**
- * The actual objects that are the target of the reference (Include additional information (for example, patient height and weight) that supports the ordering of the medication.)
- */
- protected List supportingInformationTarget;
-
-
- /**
- * The date (and perhaps time) when the prescription was initially written or authored on.
- */
- @Child(name = "authoredOn", type = {DateTimeType.class}, order=12, min=0, max=1, modifier=false, summary=true)
- @Description(shortDefinition="When request was initially authored", formalDefinition="The date (and perhaps time) when the prescription was initially written or authored on." )
- protected DateTimeType authoredOn;
-
- /**
- * The individual, organization, or device that initiated the request and has responsibility for its activation.
- */
- @Child(name = "requester", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class, Device.class}, order=13, min=0, max=1, modifier=false, summary=true)
- @Description(shortDefinition="Who/What requested the Request", formalDefinition="The individual, organization, or device that initiated the request and has responsibility for its activation." )
- protected Reference requester;
-
- /**
- * The actual object that is the target of the reference (The individual, organization, or device that initiated the request and has responsibility for its activation.)
- */
- protected Resource requesterTarget;
-
- /**
- * The specified desired performer of the medication treatment (e.g. the performer of the medication administration).
- */
- @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, Device.class, RelatedPerson.class, CareTeam.class}, order=14, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Intended performer of administration", formalDefinition="The specified desired performer of the medication treatment (e.g. the performer of the medication administration)." )
- protected Reference performer;
-
- /**
- * The actual object that is the target of the reference (The specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
- */
- protected Resource performerTarget;
-
- /**
- * Indicates the type of performer of the administration of the medication.
- */
- @Child(name = "performerType", type = {CodeableConcept.class}, order=15, min=0, max=1, modifier=false, summary=true)
- @Description(shortDefinition="Desired kind of performer of the medication administration", formalDefinition="Indicates the type of performer of the administration of the medication." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/performer-role")
- protected CodeableConcept performerType;
-
- /**
- * The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.
- */
- @Child(name = "recorder", type = {Practitioner.class, PractitionerRole.class}, order=16, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Person who entered the request", formalDefinition="The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order." )
- protected Reference recorder;
-
- /**
- * The actual object that is the target of the reference (The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
- */
- protected Resource recorderTarget;
-
- /**
- * The reason or the indication for ordering or not ordering the medication.
- */
- @Child(name = "reasonCode", type = {CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="Reason or indication for ordering or not ordering the medication", formalDefinition="The reason or the indication for ordering or not ordering the medication." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
- protected List reasonCode;
-
- /**
- * Condition or observation that supports why the medication was ordered.
- */
- @Child(name = "reasonReference", type = {Condition.class, Observation.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="Condition or observation that supports why the prescription is being written", formalDefinition="Condition or observation that supports why the medication was ordered." )
- protected List reasonReference;
- /**
- * The actual objects that are the target of the reference (Condition or observation that supports why the medication was ordered.)
- */
- protected List reasonReferenceTarget;
-
-
- /**
- * The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.
- */
- @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
- @Description(shortDefinition="Instantiates FHIR protocol or definition", formalDefinition="The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest." )
- protected List instantiatesCanonical;
-
- /**
- * The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.
- */
- @Child(name = "instantiatesUri", type = {UriType.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
- @Description(shortDefinition="Instantiates external protocol or definition", formalDefinition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest." )
- protected List instantiatesUri;
-
- /**
- * A plan or request that is fulfilled in whole or in part by this medication request.
- */
- @Child(name = "basedOn", type = {CarePlan.class, MedicationRequest.class, ServiceRequest.class, ImmunizationRecommendation.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
- @Description(shortDefinition="What request fulfills", formalDefinition="A plan or request that is fulfilled in whole or in part by this medication request." )
- protected List basedOn;
- /**
- * The actual objects that are the target of the reference (A plan or request that is fulfilled in whole or in part by this medication request.)
- */
- protected List basedOnTarget;
-
-
- /**
- * A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.
- */
- @Child(name = "groupIdentifier", type = {Identifier.class}, order=22, min=0, max=1, modifier=false, summary=true)
- @Description(shortDefinition="Composite request this is part of", formalDefinition="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription." )
- protected Identifier groupIdentifier;
-
- /**
- * The description of the overall patte3rn of the administration of the medication to the patient.
- */
- @Child(name = "courseOfTherapyType", type = {CodeableConcept.class}, order=23, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Overall pattern of medication administration", formalDefinition="The description of the overall patte3rn of the administration of the medication to the patient." )
- @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy")
- protected CodeableConcept courseOfTherapyType;
-
- /**
- * Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.
- */
- @Child(name = "insurance", type = {Coverage.class, ClaimResponse.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="Associated insurance coverage", formalDefinition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service." )
- protected List insurance;
- /**
- * The actual objects that are the target of the reference (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.)
- */
- protected List insuranceTarget;
-
-
- /**
- * Extra information about the prescription that could not be conveyed by the other attributes.
- */
- @Child(name = "note", type = {Annotation.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="Information about the prescription", formalDefinition="Extra information about the prescription that could not be conveyed by the other attributes." )
- protected List note;
-
- /**
- * Indicates how the medication is to be used by the patient.
- */
- @Child(name = "dosageInstruction", type = {Dosage.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="How the medication should be taken", formalDefinition="Indicates how the medication is to be used by the patient." )
- protected List dosageInstruction;
-
- /**
- * Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.
- */
- @Child(name = "dispenseRequest", type = {}, order=27, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Medication supply authorization", formalDefinition="Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department." )
- protected MedicationRequestDispenseRequestComponent dispenseRequest;
-
- /**
- * Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.
- */
- @Child(name = "substitution", type = {}, order=28, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="Any restrictions on medication substitution", formalDefinition="Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done." )
- protected MedicationRequestSubstitutionComponent substitution;
-
- /**
- * A link to a resource representing an earlier order related order or prescription.
- */
- @Child(name = "priorPrescription", type = {MedicationRequest.class}, order=29, min=0, max=1, modifier=false, summary=false)
- @Description(shortDefinition="An order/prescription that is being replaced", formalDefinition="A link to a resource representing an earlier order related order or prescription." )
- protected Reference priorPrescription;
-
- /**
- * The actual object that is the target of the reference (A link to a resource representing an earlier order related order or prescription.)
- */
- protected MedicationRequest priorPrescriptionTarget;
-
- /**
- * 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, duplicate therapy, dosage alert etc.
- */
- @Child(name = "detectedIssue", type = {DetectedIssue.class}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="Clinical Issue with action", formalDefinition="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, duplicate therapy, dosage alert etc." )
- protected List detectedIssue;
- /**
- * The actual objects that are the target of the reference (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, duplicate therapy, dosage alert etc.)
- */
- protected List detectedIssueTarget;
-
-
- /**
- * Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.
- */
- @Child(name = "eventHistory", type = {Provenance.class}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
- @Description(shortDefinition="A list of events of interest in the lifecycle", formalDefinition="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource." )
- protected List eventHistory;
- /**
- * The actual objects that are the target of the reference (Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.)
- */
- protected List eventHistoryTarget;
-
-
- private static final long serialVersionUID = 1313900480L;
+ public MedicationRequest addIdentifier(Identifier t) { //3
+ if (t == null)
+ return this;
+ if (this.identifier == null)
+ this.identifier = new ArrayList();
+ this.identifier.add(t);
+ return this;
+ }
/**
- * Constructor
+ * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
- public MedicationRequest() {
- super();
+ public Identifier getIdentifierFirstRep() {
+ if (getIdentifier().isEmpty()) {
+ addIdentifier();
}
+ return getIdentifier().get(0);
+ }
/**
- * Constructor
+ * @return {@link #status} (A code specifying the current state of the order. Generally, this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
- public MedicationRequest(Enumeration status, Enumeration intent, Type medication, Reference subject) {
- super();
- this.status = status;
- this.intent = intent;
- this.medication = medication;
- this.subject = subject;
- }
+ public Enumeration getStatusElement() {
+ if (this.status == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.status");
+ else if (Configuration.doAutoCreate())
+ this.status = new Enumeration(new MedicationRequestStatusEnumFactory()); // bb
+ return this.status;
+ }
- /**
- * @return {@link #identifier} (Identifiers associated with this medication request 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.)
- */
- public List getIdentifier() {
- if (this.identifier == null)
- this.identifier = new ArrayList();
- return this.identifier;
- }
+ public boolean hasStatusElement() {
+ return this.status != null && !this.status.isEmpty();
+ }
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setIdentifier(List theIdentifier) {
- this.identifier = theIdentifier;
- return this;
- }
+ public boolean hasStatus() {
+ return this.status != null && !this.status.isEmpty();
+ }
- public boolean hasIdentifier() {
- if (this.identifier == null)
- return false;
- for (Identifier item : this.identifier)
- if (!item.isEmpty())
- return true;
+ /**
+ * @param value {@link #status} (A code specifying the current state of the order. Generally, this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
+ */
+ public MedicationRequest setStatusElement(Enumeration value) {
+ this.status = value;
+ return this;
+ }
+
+ /**
+ * @return A code specifying the current state of the order. Generally, this will be active or completed state.
+ */
+ public MedicationRequestStatus getStatus() {
+ return this.status == null ? null : this.status.getValue();
+ }
+
+ /**
+ * @param value A code specifying the current state of the order. Generally, this will be active or completed state.
+ */
+ public MedicationRequest setStatus(MedicationRequestStatus value) {
+ if (this.status == null)
+ this.status = new Enumeration(new MedicationRequestStatusEnumFactory());
+ this.status.setValue(value);
+ return this;
+ }
+
+ /**
+ * @return {@link #statusReason} (Captures the reason for the current state of the MedicationRequest.)
+ */
+ public CodeableConcept getStatusReason() {
+ if (this.statusReason == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.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 state of the MedicationRequest.)
+ */
+ public MedicationRequest setStatusReason(CodeableConcept value) {
+ this.statusReason = value;
+ return this;
+ }
+
+ /**
+ * @return {@link #intent} (Whether the request is a proposal, plan, or an original order.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
+ */
+ public Enumeration getIntentElement() {
+ if (this.intent == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.intent");
+ else if (Configuration.doAutoCreate())
+ this.intent = new Enumeration(new MedicationRequestIntentEnumFactory()); // bb
+ return this.intent;
+ }
+
+ public boolean hasIntentElement() {
+ return this.intent != null && !this.intent.isEmpty();
+ }
+
+ public boolean hasIntent() {
+ return this.intent != null && !this.intent.isEmpty();
+ }
+
+ /**
+ * @param value {@link #intent} (Whether the request is a proposal, plan, or an original order.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
+ */
+ public MedicationRequest setIntentElement(Enumeration value) {
+ this.intent = value;
+ return this;
+ }
+
+ /**
+ * @return Whether the request is a proposal, plan, or an original order.
+ */
+ public MedicationRequestIntent getIntent() {
+ return this.intent == null ? null : this.intent.getValue();
+ }
+
+ /**
+ * @param value Whether the request is a proposal, plan, or an original order.
+ */
+ public MedicationRequest setIntent(MedicationRequestIntent value) {
+ if (this.intent == null)
+ this.intent = new Enumeration(new MedicationRequestIntentEnumFactory());
+ this.intent.setValue(value);
+ return this;
+ }
+
+ /**
+ * @return {@link #category} (Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).)
+ */
+ public List getCategory() {
+ if (this.category == null)
+ this.category = new ArrayList();
+ return this.category;
+ }
+
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setCategory(List theCategory) {
+ this.category = theCategory;
+ return this;
+ }
+
+ public boolean hasCategory() {
+ if (this.category == null)
return false;
- }
+ for (CodeableConcept item : this.category)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- public Identifier addIdentifier() { //3
- Identifier t = new Identifier();
- if (this.identifier == null)
- this.identifier = new ArrayList();
- this.identifier.add(t);
- return t;
- }
+ public CodeableConcept addCategory() { //3
+ CodeableConcept t = new CodeableConcept();
+ if (this.category == null)
+ this.category = new ArrayList();
+ this.category.add(t);
+ return t;
+ }
- public MedicationRequest addIdentifier(Identifier t) { //3
- if (t == null)
- return this;
- if (this.identifier == null)
- this.identifier = new ArrayList();
- this.identifier.add(t);
+ public MedicationRequest addCategory(CodeableConcept t) { //3
+ if (t == null)
return this;
- }
+ if (this.category == null)
+ this.category = new ArrayList();
+ this.category.add(t);
+ return this;
+ }
- /**
- * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
- */
- public Identifier getIdentifierFirstRep() {
- if (getIdentifier().isEmpty()) {
- addIdentifier();
- }
- return getIdentifier().get(0);
+ /**
+ * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist
+ */
+ public CodeableConcept getCategoryFirstRep() {
+ if (getCategory().isEmpty()) {
+ addCategory();
}
+ return getCategory().get(0);
+ }
- /**
- * @return {@link #status} (A code specifying the current state of the order. Generally, this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
- */
- public Enumeration getStatusElement() {
- if (this.status == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.status");
- else if (Configuration.doAutoCreate())
- this.status = new Enumeration(new MedicationRequestStatusEnumFactory()); // bb
- return this.status;
- }
+ /**
+ * @return {@link #priority} (Indicates how quickly the Medication Request should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
+ */
+ public Enumeration getPriorityElement() {
+ if (this.priority == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.priority");
+ else if (Configuration.doAutoCreate())
+ this.priority = new Enumeration(new MedicationRequestPriorityEnumFactory()); // bb
+ return this.priority;
+ }
- public boolean hasStatusElement() {
- return this.status != null && !this.status.isEmpty();
- }
+ public boolean hasPriorityElement() {
+ return this.priority != null && !this.priority.isEmpty();
+ }
- public boolean hasStatus() {
- return this.status != null && !this.status.isEmpty();
- }
+ public boolean hasPriority() {
+ return this.priority != null && !this.priority.isEmpty();
+ }
- /**
- * @param value {@link #status} (A code specifying the current state of the order. Generally, this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
- */
- public MedicationRequest setStatusElement(Enumeration value) {
- this.status = value;
- return this;
- }
+ /**
+ * @param value {@link #priority} (Indicates how quickly the Medication Request should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
+ */
+ public MedicationRequest setPriorityElement(Enumeration value) {
+ this.priority = value;
+ return this;
+ }
- /**
- * @return A code specifying the current state of the order. Generally, this will be active or completed state.
- */
- public MedicationRequestStatus getStatus() {
- return this.status == null ? null : this.status.getValue();
- }
+ /**
+ * @return Indicates how quickly the Medication Request should be addressed with respect to other requests.
+ */
+ public MedicationRequestPriority getPriority() {
+ return this.priority == null ? null : this.priority.getValue();
+ }
- /**
- * @param value A code specifying the current state of the order. Generally, this will be active or completed state.
- */
- public MedicationRequest setStatus(MedicationRequestStatus value) {
- if (this.status == null)
- this.status = new Enumeration(new MedicationRequestStatusEnumFactory());
- this.status.setValue(value);
- return this;
- }
-
- /**
- * @return {@link #statusReason} (Captures the reason for the current state of the MedicationRequest.)
- */
- public CodeableConcept getStatusReason() {
- if (this.statusReason == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.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 state of the MedicationRequest.)
- */
- public MedicationRequest setStatusReason(CodeableConcept value) {
- this.statusReason = value;
- return this;
- }
-
- /**
- * @return {@link #intent} (Whether the request is a proposal, plan, or an original order.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
- */
- public Enumeration getIntentElement() {
- if (this.intent == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.intent");
- else if (Configuration.doAutoCreate())
- this.intent = new Enumeration(new MedicationRequestIntentEnumFactory()); // bb
- return this.intent;
- }
-
- public boolean hasIntentElement() {
- return this.intent != null && !this.intent.isEmpty();
- }
-
- public boolean hasIntent() {
- return this.intent != null && !this.intent.isEmpty();
- }
-
- /**
- * @param value {@link #intent} (Whether the request is a proposal, plan, or an original order.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
- */
- public MedicationRequest setIntentElement(Enumeration value) {
- this.intent = value;
- return this;
- }
-
- /**
- * @return Whether the request is a proposal, plan, or an original order.
- */
- public MedicationRequestIntent getIntent() {
- return this.intent == null ? null : this.intent.getValue();
- }
-
- /**
- * @param value Whether the request is a proposal, plan, or an original order.
- */
- public MedicationRequest setIntent(MedicationRequestIntent value) {
- if (this.intent == null)
- this.intent = new Enumeration(new MedicationRequestIntentEnumFactory());
- this.intent.setValue(value);
- return this;
- }
-
- /**
- * @return {@link #category} (Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).)
- */
- public List getCategory() {
- if (this.category == null)
- this.category = new ArrayList();
- return this.category;
- }
-
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setCategory(List theCategory) {
- this.category = theCategory;
- return this;
- }
-
- public boolean hasCategory() {
- if (this.category == null)
- return false;
- for (CodeableConcept item : this.category)
- if (!item.isEmpty())
- return true;
- return false;
- }
-
- public CodeableConcept addCategory() { //3
- CodeableConcept t = new CodeableConcept();
- if (this.category == null)
- this.category = new ArrayList();
- this.category.add(t);
- return t;
- }
-
- public MedicationRequest addCategory(CodeableConcept t) { //3
- if (t == null)
- return this;
- if (this.category == null)
- this.category = new ArrayList();
- this.category.add(t);
- return this;
- }
-
- /**
- * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist
- */
- public CodeableConcept getCategoryFirstRep() {
- if (getCategory().isEmpty()) {
- addCategory();
- }
- return getCategory().get(0);
- }
-
- /**
- * @return {@link #priority} (Indicates how quickly the Medication Request should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
- */
- public Enumeration getPriorityElement() {
+ /**
+ * @param value Indicates how quickly the Medication Request should be addressed with respect to other requests.
+ */
+ public MedicationRequest setPriority(MedicationRequestPriority value) {
+ if (value == null)
+ this.priority = null;
+ else {
if (this.priority == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.priority");
- else if (Configuration.doAutoCreate())
- this.priority = new Enumeration(new MedicationRequestPriorityEnumFactory()); // bb
- return this.priority;
+ this.priority = new Enumeration(new MedicationRequestPriorityEnumFactory());
+ this.priority.setValue(value);
}
+ return this;
+ }
- public boolean hasPriorityElement() {
- return this.priority != null && !this.priority.isEmpty();
- }
+ /**
+ * @return {@link #doNotPerform} (If true indicates that the provider is asking for the medication request not to occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
+ */
+ public BooleanType getDoNotPerformElement() {
+ if (this.doNotPerform == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.doNotPerform");
+ else if (Configuration.doAutoCreate())
+ this.doNotPerform = new BooleanType(); // bb
+ return this.doNotPerform;
+ }
- public boolean hasPriority() {
- return this.priority != null && !this.priority.isEmpty();
- }
+ public boolean hasDoNotPerformElement() {
+ return this.doNotPerform != null && !this.doNotPerform.isEmpty();
+ }
- /**
- * @param value {@link #priority} (Indicates how quickly the Medication Request should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
- */
- public MedicationRequest setPriorityElement(Enumeration value) {
- this.priority = value;
- return this;
- }
+ public boolean hasDoNotPerform() {
+ return this.doNotPerform != null && !this.doNotPerform.isEmpty();
+ }
- /**
- * @return Indicates how quickly the Medication Request should be addressed with respect to other requests.
- */
- public MedicationRequestPriority getPriority() {
- return this.priority == null ? null : this.priority.getValue();
- }
+ /**
+ * @param value {@link #doNotPerform} (If true indicates that the provider is asking for the medication request not to occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
+ */
+ public MedicationRequest setDoNotPerformElement(BooleanType value) {
+ this.doNotPerform = value;
+ return this;
+ }
- /**
- * @param value Indicates how quickly the Medication Request should be addressed with respect to other requests.
- */
- public MedicationRequest setPriority(MedicationRequestPriority value) {
- if (value == null)
- this.priority = null;
- else {
- if (this.priority == null)
- this.priority = new Enumeration(new MedicationRequestPriorityEnumFactory());
- this.priority.setValue(value);
- }
- return this;
- }
+ /**
+ * @return If true indicates that the provider is asking for the medication request not to occur.
+ */
+ public boolean getDoNotPerform() {
+ return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue();
+ }
- /**
- * @return {@link #doNotPerform} (If true indicates that the provider is asking for the medication request not to occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
- */
- public BooleanType getDoNotPerformElement() {
- if (this.doNotPerform == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.doNotPerform");
- else if (Configuration.doAutoCreate())
- this.doNotPerform = new BooleanType(); // bb
- return this.doNotPerform;
- }
+ /**
+ * @param value If true indicates that the provider is asking for the medication request not to occur.
+ */
+ public MedicationRequest setDoNotPerform(boolean value) {
+ if (this.doNotPerform == null)
+ this.doNotPerform = new BooleanType();
+ this.doNotPerform.setValue(value);
+ return this;
+ }
- public boolean hasDoNotPerformElement() {
- return this.doNotPerform != null && !this.doNotPerform.isEmpty();
- }
+ /**
+ * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
+ */
+ public Type getReported() {
+ return this.reported;
+ }
- public boolean hasDoNotPerform() {
- return this.doNotPerform != null && !this.doNotPerform.isEmpty();
- }
+ /**
+ * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
+ */
+ public BooleanType getReportedBooleanType() throws FHIRException {
+ if (this.reported == null)
+ this.reported = new BooleanType();
+ if (!(this.reported instanceof BooleanType))
+ throw new FHIRException("Type mismatch: the type BooleanType was expected, but " + this.reported.getClass().getName() + " was encountered");
+ return (BooleanType) this.reported;
+ }
- /**
- * @param value {@link #doNotPerform} (If true indicates that the provider is asking for the medication request not to occur.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
- */
- public MedicationRequest setDoNotPerformElement(BooleanType value) {
- this.doNotPerform = value;
- return this;
- }
+ public boolean hasReportedBooleanType() {
+ return this != null && this.reported instanceof BooleanType;
+ }
- /**
- * @return If true indicates that the provider is asking for the medication request not to occur.
- */
- public boolean getDoNotPerform() {
- return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue();
- }
+ /**
+ * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
+ */
+ public Reference getReportedReference() throws FHIRException {
+ if (this.reported == null)
+ this.reported = new Reference();
+ if (!(this.reported instanceof Reference))
+ throw new FHIRException("Type mismatch: the type Reference was expected, but " + this.reported.getClass().getName() + " was encountered");
+ return (Reference) this.reported;
+ }
- /**
- * @param value If true indicates that the provider is asking for the medication request not to occur.
- */
- public MedicationRequest setDoNotPerform(boolean value) {
- if (this.doNotPerform == null)
- this.doNotPerform = new BooleanType();
- this.doNotPerform.setValue(value);
- return this;
- }
+ public boolean hasReportedReference() {
+ return this != null && this.reported instanceof Reference;
+ }
- /**
- * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
- */
- public Type getReported() {
- return this.reported;
- }
+ public boolean hasReported() {
+ return this.reported != null && !this.reported.isEmpty();
+ }
- /**
- * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
- */
- public BooleanType getReportedBooleanType() throws FHIRException {
- if (this.reported == null)
- this.reported = new BooleanType();
- if (!(this.reported instanceof BooleanType))
- throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.reported.getClass().getName()+" was encountered");
- return (BooleanType) this.reported;
- }
+ /**
+ * @param value {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
+ */
+ public MedicationRequest setReported(Type value) {
+ if (value != null && !(value instanceof BooleanType || value instanceof Reference))
+ throw new Error("Not the right type for MedicationRequest.reported[x]: " + value.fhirType());
+ this.reported = value;
+ return this;
+ }
- public boolean hasReportedBooleanType() {
- return this != null && this.reported instanceof BooleanType;
- }
+ /**
+ * @return {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
+ */
+ public Type getMedication() {
+ return this.medication;
+ }
- /**
- * @return {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
- */
- public Reference getReportedReference() throws FHIRException {
- if (this.reported == null)
- this.reported = new Reference();
- if (!(this.reported instanceof Reference))
- throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reported.getClass().getName()+" was encountered");
- return (Reference) this.reported;
- }
+ /**
+ * @return {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
+ */
+ public CodeableConcept getMedicationCodeableConcept() throws FHIRException {
+ if (this.medication == null)
+ this.medication = new CodeableConcept();
+ if (!(this.medication instanceof CodeableConcept))
+ throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but " + this.medication.getClass().getName() + " was encountered");
+ return (CodeableConcept) this.medication;
+ }
- public boolean hasReportedReference() {
- return this != null && this.reported instanceof Reference;
- }
+ public boolean hasMedicationCodeableConcept() {
+ return this != null && this.medication instanceof CodeableConcept;
+ }
- public boolean hasReported() {
- return this.reported != null && !this.reported.isEmpty();
- }
+ /**
+ * @return {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
+ */
+ public Reference getMedicationReference() throws FHIRException {
+ if (this.medication == null)
+ this.medication = new Reference();
+ if (!(this.medication instanceof Reference))
+ throw new FHIRException("Type mismatch: the type Reference was expected, but " + this.medication.getClass().getName() + " was encountered");
+ return (Reference) this.medication;
+ }
- /**
- * @param value {@link #reported} (Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.)
- */
- public MedicationRequest setReported(Type value) {
- if (value != null && !(value instanceof BooleanType || value instanceof Reference))
- throw new Error("Not the right type for MedicationRequest.reported[x]: "+value.fhirType());
- this.reported = value;
- return this;
- }
+ public boolean hasMedicationReference() {
+ return this != null && this.medication instanceof Reference;
+ }
- /**
- * @return {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
- */
- public Type getMedication() {
- return this.medication;
- }
+ public boolean hasMedication() {
+ return this.medication != null && !this.medication.isEmpty();
+ }
- /**
- * @return {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
- */
- public CodeableConcept getMedicationCodeableConcept() throws FHIRException {
- if (this.medication == null)
- this.medication = new CodeableConcept();
- if (!(this.medication instanceof CodeableConcept))
- throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.medication.getClass().getName()+" was encountered");
- return (CodeableConcept) this.medication;
- }
+ /**
+ * @param value {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
+ */
+ public MedicationRequest setMedication(Type value) {
+ if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
+ throw new Error("Not the right type for MedicationRequest.medication[x]: " + value.fhirType());
+ this.medication = value;
+ return this;
+ }
- public boolean hasMedicationCodeableConcept() {
- return this != null && this.medication instanceof CodeableConcept;
- }
+ /**
+ * @return {@link #subject} (A link to a resource representing the person or set of individuals to whom the medication will be given.)
+ */
+ public Reference getSubject() {
+ if (this.subject == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.subject");
+ else if (Configuration.doAutoCreate())
+ this.subject = new Reference(); // cc
+ return this.subject;
+ }
- /**
- * @return {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
- */
- public Reference getMedicationReference() throws FHIRException {
- if (this.medication == null)
- this.medication = new Reference();
- if (!(this.medication instanceof Reference))
- throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.medication.getClass().getName()+" was encountered");
- return (Reference) this.medication;
- }
+ public boolean hasSubject() {
+ return this.subject != null && !this.subject.isEmpty();
+ }
- public boolean hasMedicationReference() {
- return this != null && this.medication instanceof Reference;
- }
+ /**
+ * @param value {@link #subject} (A link to a resource representing the person or set of individuals to whom the medication will be given.)
+ */
+ public MedicationRequest setSubject(Reference value) {
+ this.subject = value;
+ return this;
+ }
- public boolean hasMedication() {
- return this.medication != null && !this.medication.isEmpty();
- }
+ /**
+ * @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. (A link to a resource representing the person or set of individuals to whom the medication will be given.)
+ */
+ public Resource getSubjectTarget() {
+ return this.subjectTarget;
+ }
- /**
- * @param value {@link #medication} (Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
- */
- public MedicationRequest setMedication(Type value) {
- if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
- throw new Error("Not the right type for MedicationRequest.medication[x]: "+value.fhirType());
- this.medication = value;
- return this;
- }
+ /**
+ * @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. (A link to a resource representing the person or set of individuals to whom the medication will be given.)
+ */
+ public MedicationRequest setSubjectTarget(Resource value) {
+ this.subjectTarget = value;
+ return this;
+ }
- /**
- * @return {@link #subject} (A link to a resource representing the person or set of individuals to whom the medication will be given.)
- */
- public Reference getSubject() {
- if (this.subject == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.subject");
- else if (Configuration.doAutoCreate())
- this.subject = new Reference(); // cc
- return this.subject;
- }
+ /**
+ * @return {@link #encounter} (The Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
+ */
+ public Reference getEncounter() {
+ if (this.encounter == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.encounter");
+ else if (Configuration.doAutoCreate())
+ this.encounter = new Reference(); // cc
+ return this.encounter;
+ }
- public boolean hasSubject() {
- return this.subject != null && !this.subject.isEmpty();
- }
+ public boolean hasEncounter() {
+ return this.encounter != null && !this.encounter.isEmpty();
+ }
- /**
- * @param value {@link #subject} (A link to a resource representing the person or set of individuals to whom the medication will be given.)
- */
- public MedicationRequest setSubject(Reference value) {
- this.subject = value;
- return this;
- }
+ /**
+ * @param value {@link #encounter} (The Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
+ */
+ public MedicationRequest setEncounter(Reference value) {
+ this.encounter = value;
+ return this;
+ }
- /**
- * @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. (A link to a resource representing the person or set of individuals to whom the medication will be given.)
- */
- public Resource getSubjectTarget() {
- return this.subjectTarget;
- }
+ /**
+ * @return {@link #encounter} 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 Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
+ */
+ public Encounter getEncounterTarget() {
+ if (this.encounterTarget == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.encounter");
+ else if (Configuration.doAutoCreate())
+ this.encounterTarget = new Encounter(); // aa
+ return this.encounterTarget;
+ }
- /**
- * @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. (A link to a resource representing the person or set of individuals to whom the medication will be given.)
- */
- public MedicationRequest setSubjectTarget(Resource value) {
- this.subjectTarget = value;
- return this;
- }
+ /**
+ * @param value {@link #encounter} 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 Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
+ */
+ public MedicationRequest setEncounterTarget(Encounter value) {
+ this.encounterTarget = value;
+ return this;
+ }
- /**
- * @return {@link #encounter} (The Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
- */
- public Reference getEncounter() {
- if (this.encounter == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.encounter");
- else if (Configuration.doAutoCreate())
- this.encounter = new Reference(); // cc
- return this.encounter;
- }
+ /**
+ * @return {@link #supportingInformation} (Include additional information (for example, patient height and weight) that supports the ordering of the medication.)
+ */
+ public List getSupportingInformation() {
+ if (this.supportingInformation == null)
+ this.supportingInformation = new ArrayList();
+ return this.supportingInformation;
+ }
- public boolean hasEncounter() {
- return this.encounter != null && !this.encounter.isEmpty();
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setSupportingInformation(List theSupportingInformation) {
+ this.supportingInformation = theSupportingInformation;
+ return this;
+ }
- /**
- * @param value {@link #encounter} (The Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
- */
- public MedicationRequest setEncounter(Reference value) {
- this.encounter = value;
- return this;
- }
-
- /**
- * @return {@link #encounter} 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 Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
- */
- public Encounter getEncounterTarget() {
- if (this.encounterTarget == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.encounter");
- else if (Configuration.doAutoCreate())
- this.encounterTarget = new Encounter(); // aa
- return this.encounterTarget;
- }
-
- /**
- * @param value {@link #encounter} 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 Encounter during which this [x] was created or to which the creation of this record is tightly associated.)
- */
- public MedicationRequest setEncounterTarget(Encounter value) {
- this.encounterTarget = value;
- return this;
- }
-
- /**
- * @return {@link #supportingInformation} (Include additional information (for example, patient height and weight) that supports the ordering of the medication.)
- */
- public List getSupportingInformation() {
- if (this.supportingInformation == null)
- this.supportingInformation = new ArrayList();
- return this.supportingInformation;
- }
-
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setSupportingInformation(List theSupportingInformation) {
- this.supportingInformation = theSupportingInformation;
- return this;
- }
-
- public boolean hasSupportingInformation() {
- if (this.supportingInformation == null)
- return false;
- for (Reference item : this.supportingInformation)
- if (!item.isEmpty())
- return true;
+ public boolean hasSupportingInformation() {
+ if (this.supportingInformation == null)
return false;
- }
+ for (Reference item : this.supportingInformation)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- public Reference addSupportingInformation() { //3
- Reference t = new Reference();
- if (this.supportingInformation == null)
- this.supportingInformation = new ArrayList();
- this.supportingInformation.add(t);
- return t;
- }
+ public Reference addSupportingInformation() { //3
+ Reference t = new Reference();
+ if (this.supportingInformation == null)
+ this.supportingInformation = new ArrayList();
+ this.supportingInformation.add(t);
+ return t;
+ }
- public MedicationRequest addSupportingInformation(Reference t) { //3
- if (t == null)
- return this;
- if (this.supportingInformation == null)
- this.supportingInformation = new ArrayList();
- this.supportingInformation.add(t);
+ public MedicationRequest addSupportingInformation(Reference t) { //3
+ if (t == null)
return this;
- }
+ if (this.supportingInformation == null)
+ this.supportingInformation = new ArrayList();
+ this.supportingInformation.add(t);
+ return this;
+ }
- /**
- * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist
- */
- public Reference getSupportingInformationFirstRep() {
- if (getSupportingInformation().isEmpty()) {
- addSupportingInformation();
- }
- return getSupportingInformation().get(0);
+ /**
+ * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist
+ */
+ public Reference getSupportingInformationFirstRep() {
+ if (getSupportingInformation().isEmpty()) {
+ addSupportingInformation();
}
+ return getSupportingInformation().get(0);
+ }
- /**
- * @deprecated Use Reference#setResource(IBaseResource) instead
- */
- @Deprecated
- public List getSupportingInformationTarget() {
- if (this.supportingInformationTarget == null)
- this.supportingInformationTarget = new ArrayList();
- return this.supportingInformationTarget;
- }
+ /**
+ * @deprecated Use Reference#setResource(IBaseResource) instead
+ */
+ @Deprecated
+ public List getSupportingInformationTarget() {
+ if (this.supportingInformationTarget == null)
+ this.supportingInformationTarget = new ArrayList();
+ return this.supportingInformationTarget;
+ }
- /**
- * @return {@link #authoredOn} (The date (and perhaps time) when the prescription was initially written or authored on.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
- */
- public DateTimeType getAuthoredOnElement() {
+ /**
+ * @return {@link #authoredOn} (The date (and perhaps time) when the prescription was initially written or authored on.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
+ */
+ public DateTimeType getAuthoredOnElement() {
+ if (this.authoredOn == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.authoredOn");
+ else if (Configuration.doAutoCreate())
+ this.authoredOn = new DateTimeType(); // bb
+ return this.authoredOn;
+ }
+
+ public boolean hasAuthoredOnElement() {
+ return this.authoredOn != null && !this.authoredOn.isEmpty();
+ }
+
+ public boolean hasAuthoredOn() {
+ return this.authoredOn != null && !this.authoredOn.isEmpty();
+ }
+
+ /**
+ * @param value {@link #authoredOn} (The date (and perhaps time) when the prescription was initially written or authored on.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
+ */
+ public MedicationRequest setAuthoredOnElement(DateTimeType value) {
+ this.authoredOn = value;
+ return this;
+ }
+
+ /**
+ * @return The date (and perhaps time) when the prescription was initially written or authored on.
+ */
+ public Date getAuthoredOn() {
+ return this.authoredOn == null ? null : this.authoredOn.getValue();
+ }
+
+ /**
+ * @param value The date (and perhaps time) when the prescription was initially written or authored on.
+ */
+ public MedicationRequest setAuthoredOn(Date value) {
+ if (value == null)
+ this.authoredOn = null;
+ else {
if (this.authoredOn == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.authoredOn");
- else if (Configuration.doAutoCreate())
- this.authoredOn = new DateTimeType(); // bb
- return this.authoredOn;
+ this.authoredOn = new DateTimeType();
+ this.authoredOn.setValue(value);
}
+ return this;
+ }
- public boolean hasAuthoredOnElement() {
- return this.authoredOn != null && !this.authoredOn.isEmpty();
- }
+ /**
+ * @return {@link #requester} (The individual, organization, or device that initiated the request and has responsibility for its activation.)
+ */
+ public Reference getRequester() {
+ if (this.requester == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.requester");
+ else if (Configuration.doAutoCreate())
+ this.requester = new Reference(); // cc
+ return this.requester;
+ }
- public boolean hasAuthoredOn() {
- return this.authoredOn != null && !this.authoredOn.isEmpty();
- }
+ public boolean hasRequester() {
+ return this.requester != null && !this.requester.isEmpty();
+ }
- /**
- * @param value {@link #authoredOn} (The date (and perhaps time) when the prescription was initially written or authored on.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
- */
- public MedicationRequest setAuthoredOnElement(DateTimeType value) {
- this.authoredOn = value;
- return this;
- }
+ /**
+ * @param value {@link #requester} (The individual, organization, or device that initiated the request and has responsibility for its activation.)
+ */
+ public MedicationRequest setRequester(Reference value) {
+ this.requester = value;
+ return this;
+ }
- /**
- * @return The date (and perhaps time) when the prescription was initially written or authored on.
- */
- public Date getAuthoredOn() {
- return this.authoredOn == null ? null : this.authoredOn.getValue();
- }
+ /**
+ * @return {@link #requester} 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 individual, organization, or device that initiated the request and has responsibility for its activation.)
+ */
+ public Resource getRequesterTarget() {
+ return this.requesterTarget;
+ }
- /**
- * @param value The date (and perhaps time) when the prescription was initially written or authored on.
- */
- public MedicationRequest setAuthoredOn(Date value) {
- if (value == null)
- this.authoredOn = null;
- else {
- if (this.authoredOn == null)
- this.authoredOn = new DateTimeType();
- this.authoredOn.setValue(value);
- }
- return this;
- }
+ /**
+ * @param value {@link #requester} 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 individual, organization, or device that initiated the request and has responsibility for its activation.)
+ */
+ public MedicationRequest setRequesterTarget(Resource value) {
+ this.requesterTarget = value;
+ return this;
+ }
- /**
- * @return {@link #requester} (The individual, organization, or device that initiated the request and has responsibility for its activation.)
- */
- public Reference getRequester() {
- if (this.requester == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.requester");
- else if (Configuration.doAutoCreate())
- this.requester = new Reference(); // cc
- return this.requester;
- }
+ /**
+ * @return {@link #performer} (The specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
+ */
+ public Reference getPerformer() {
+ if (this.performer == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.performer");
+ else if (Configuration.doAutoCreate())
+ this.performer = new Reference(); // cc
+ return this.performer;
+ }
- public boolean hasRequester() {
- return this.requester != null && !this.requester.isEmpty();
- }
+ public boolean hasPerformer() {
+ return this.performer != null && !this.performer.isEmpty();
+ }
- /**
- * @param value {@link #requester} (The individual, organization, or device that initiated the request and has responsibility for its activation.)
- */
- public MedicationRequest setRequester(Reference value) {
- this.requester = value;
- return this;
- }
+ /**
+ * @param value {@link #performer} (The specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
+ */
+ public MedicationRequest setPerformer(Reference value) {
+ this.performer = value;
+ return this;
+ }
- /**
- * @return {@link #requester} 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 individual, organization, or device that initiated the request and has responsibility for its activation.)
- */
- public Resource getRequesterTarget() {
- return this.requesterTarget;
- }
+ /**
+ * @return {@link #performer} 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 specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
+ */
+ public Resource getPerformerTarget() {
+ return this.performerTarget;
+ }
- /**
- * @param value {@link #requester} 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 individual, organization, or device that initiated the request and has responsibility for its activation.)
- */
- public MedicationRequest setRequesterTarget(Resource value) {
- this.requesterTarget = value;
- return this;
- }
+ /**
+ * @param value {@link #performer} 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 specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
+ */
+ public MedicationRequest setPerformerTarget(Resource value) {
+ this.performerTarget = value;
+ return this;
+ }
- /**
- * @return {@link #performer} (The specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
- */
- public Reference getPerformer() {
- if (this.performer == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.performer");
- else if (Configuration.doAutoCreate())
- this.performer = new Reference(); // cc
- return this.performer;
- }
+ /**
+ * @return {@link #performerType} (Indicates the type of performer of the administration of the medication.)
+ */
+ public CodeableConcept getPerformerType() {
+ if (this.performerType == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.performerType");
+ else if (Configuration.doAutoCreate())
+ this.performerType = new CodeableConcept(); // cc
+ return this.performerType;
+ }
- public boolean hasPerformer() {
- return this.performer != null && !this.performer.isEmpty();
- }
+ public boolean hasPerformerType() {
+ return this.performerType != null && !this.performerType.isEmpty();
+ }
- /**
- * @param value {@link #performer} (The specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
- */
- public MedicationRequest setPerformer(Reference value) {
- this.performer = value;
- return this;
- }
+ /**
+ * @param value {@link #performerType} (Indicates the type of performer of the administration of the medication.)
+ */
+ public MedicationRequest setPerformerType(CodeableConcept value) {
+ this.performerType = value;
+ return this;
+ }
- /**
- * @return {@link #performer} 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 specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
- */
- public Resource getPerformerTarget() {
- return this.performerTarget;
- }
+ /**
+ * @return {@link #recorder} (The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
+ */
+ public Reference getRecorder() {
+ if (this.recorder == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.recorder");
+ else if (Configuration.doAutoCreate())
+ this.recorder = new Reference(); // cc
+ return this.recorder;
+ }
- /**
- * @param value {@link #performer} 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 specified desired performer of the medication treatment (e.g. the performer of the medication administration).)
- */
- public MedicationRequest setPerformerTarget(Resource value) {
- this.performerTarget = value;
- return this;
- }
+ public boolean hasRecorder() {
+ return this.recorder != null && !this.recorder.isEmpty();
+ }
- /**
- * @return {@link #performerType} (Indicates the type of performer of the administration of the medication.)
- */
- public CodeableConcept getPerformerType() {
- if (this.performerType == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.performerType");
- else if (Configuration.doAutoCreate())
- this.performerType = new CodeableConcept(); // cc
- return this.performerType;
- }
+ /**
+ * @param value {@link #recorder} (The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
+ */
+ public MedicationRequest setRecorder(Reference value) {
+ this.recorder = value;
+ return this;
+ }
- public boolean hasPerformerType() {
- return this.performerType != null && !this.performerType.isEmpty();
- }
+ /**
+ * @return {@link #recorder} 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 who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
+ */
+ public Resource getRecorderTarget() {
+ return this.recorderTarget;
+ }
- /**
- * @param value {@link #performerType} (Indicates the type of performer of the administration of the medication.)
- */
- public MedicationRequest setPerformerType(CodeableConcept value) {
- this.performerType = value;
- return this;
- }
+ /**
+ * @param value {@link #recorder} 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 who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
+ */
+ public MedicationRequest setRecorderTarget(Resource value) {
+ this.recorderTarget = value;
+ return this;
+ }
- /**
- * @return {@link #recorder} (The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
- */
- public Reference getRecorder() {
- if (this.recorder == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.recorder");
- else if (Configuration.doAutoCreate())
- this.recorder = new Reference(); // cc
- return this.recorder;
- }
+ /**
+ * @return {@link #reasonCode} (The reason or the indication for ordering or not ordering the medication.)
+ */
+ public List getReasonCode() {
+ if (this.reasonCode == null)
+ this.reasonCode = new ArrayList();
+ return this.reasonCode;
+ }
- public boolean hasRecorder() {
- return this.recorder != null && !this.recorder.isEmpty();
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setReasonCode(List theReasonCode) {
+ this.reasonCode = theReasonCode;
+ return this;
+ }
- /**
- * @param value {@link #recorder} (The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
- */
- public MedicationRequest setRecorder(Reference value) {
- this.recorder = value;
- return this;
- }
-
- /**
- * @return {@link #recorder} 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 who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
- */
- public Resource getRecorderTarget() {
- return this.recorderTarget;
- }
-
- /**
- * @param value {@link #recorder} 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 who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.)
- */
- public MedicationRequest setRecorderTarget(Resource value) {
- this.recorderTarget = value;
- return this;
- }
-
- /**
- * @return {@link #reasonCode} (The reason or the indication for ordering or not ordering the medication.)
- */
- public List getReasonCode() {
- if (this.reasonCode == null)
- this.reasonCode = new ArrayList();
- return this.reasonCode;
- }
-
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setReasonCode(List theReasonCode) {
- this.reasonCode = theReasonCode;
- return this;
- }
-
- public boolean hasReasonCode() {
- if (this.reasonCode == null)
- return false;
- for (CodeableConcept item : this.reasonCode)
- if (!item.isEmpty())
- return true;
+ public boolean hasReasonCode() {
+ if (this.reasonCode == null)
return false;
- }
+ for (CodeableConcept item : this.reasonCode)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- public CodeableConcept addReasonCode() { //3
- CodeableConcept t = new CodeableConcept();
- if (this.reasonCode == null)
- this.reasonCode = new ArrayList();
- this.reasonCode.add(t);
- return t;
- }
+ public CodeableConcept addReasonCode() { //3
+ CodeableConcept t = new CodeableConcept();
+ if (this.reasonCode == null)
+ this.reasonCode = new ArrayList();
+ this.reasonCode.add(t);
+ return t;
+ }
- public MedicationRequest addReasonCode(CodeableConcept t) { //3
- if (t == null)
- return this;
- if (this.reasonCode == null)
- this.reasonCode = new ArrayList();
- this.reasonCode.add(t);
+ public MedicationRequest addReasonCode(CodeableConcept t) { //3
+ if (t == null)
return this;
- }
+ if (this.reasonCode == null)
+ this.reasonCode = new ArrayList();
+ this.reasonCode.add(t);
+ return this;
+ }
- /**
- * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist
- */
- public CodeableConcept getReasonCodeFirstRep() {
- if (getReasonCode().isEmpty()) {
- addReasonCode();
- }
- return getReasonCode().get(0);
+ /**
+ * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist
+ */
+ public CodeableConcept getReasonCodeFirstRep() {
+ if (getReasonCode().isEmpty()) {
+ addReasonCode();
}
+ return getReasonCode().get(0);
+ }
- /**
- * @return {@link #reasonReference} (Condition or observation that supports why the medication was ordered.)
- */
- public List getReasonReference() {
- if (this.reasonReference == null)
- this.reasonReference = new ArrayList();
- return this.reasonReference;
- }
+ /**
+ * @return {@link #reasonReference} (Condition or observation that supports why the medication was ordered.)
+ */
+ public List getReasonReference() {
+ if (this.reasonReference == null)
+ this.reasonReference = new ArrayList();
+ return this.reasonReference;
+ }
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setReasonReference(List theReasonReference) {
- this.reasonReference = theReasonReference;
- return this;
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setReasonReference(List theReasonReference) {
+ this.reasonReference = theReasonReference;
+ return this;
+ }
- public boolean hasReasonReference() {
- if (this.reasonReference == null)
- return false;
- for (Reference item : this.reasonReference)
- if (!item.isEmpty())
- return true;
+ public boolean hasReasonReference() {
+ if (this.reasonReference == null)
return false;
- }
+ for (Reference item : this.reasonReference)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- public Reference addReasonReference() { //3
- Reference t = new Reference();
- if (this.reasonReference == null)
- this.reasonReference = new ArrayList();
- this.reasonReference.add(t);
- return t;
- }
+ public Reference addReasonReference() { //3
+ Reference t = new Reference();
+ if (this.reasonReference == null)
+ this.reasonReference = new ArrayList();
+ this.reasonReference.add(t);
+ return t;
+ }
- public MedicationRequest addReasonReference(Reference t) { //3
- if (t == null)
- return this;
- if (this.reasonReference == null)
- this.reasonReference = new ArrayList();
- this.reasonReference.add(t);
+ public MedicationRequest addReasonReference(Reference t) { //3
+ if (t == null)
return this;
- }
+ if (this.reasonReference == null)
+ this.reasonReference = new ArrayList();
+ this.reasonReference.add(t);
+ return this;
+ }
- /**
- * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist
- */
- public Reference getReasonReferenceFirstRep() {
- if (getReasonReference().isEmpty()) {
- addReasonReference();
- }
- return getReasonReference().get(0);
+ /**
+ * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist
+ */
+ public Reference getReasonReferenceFirstRep() {
+ if (getReasonReference().isEmpty()) {
+ addReasonReference();
}
+ return getReasonReference().get(0);
+ }
- /**
- * @deprecated Use Reference#setResource(IBaseResource) instead
- */
- @Deprecated
- public List getReasonReferenceTarget() {
- if (this.reasonReferenceTarget == null)
- this.reasonReferenceTarget = new ArrayList();
- return this.reasonReferenceTarget;
- }
+ /**
+ * @deprecated Use Reference#setResource(IBaseResource) instead
+ */
+ @Deprecated
+ public List getReasonReferenceTarget() {
+ if (this.reasonReferenceTarget == null)
+ this.reasonReferenceTarget = new ArrayList();
+ return this.reasonReferenceTarget;
+ }
- /**
- * @return {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public List getInstantiatesCanonical() {
- if (this.instantiatesCanonical == null)
- this.instantiatesCanonical = new ArrayList();
- return this.instantiatesCanonical;
- }
+ /**
+ * @return {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public List getInstantiatesCanonical() {
+ if (this.instantiatesCanonical == null)
+ this.instantiatesCanonical = new ArrayList();
+ return this.instantiatesCanonical;
+ }
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setInstantiatesCanonical(List theInstantiatesCanonical) {
- this.instantiatesCanonical = theInstantiatesCanonical;
- return this;
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setInstantiatesCanonical(List theInstantiatesCanonical) {
+ this.instantiatesCanonical = theInstantiatesCanonical;
+ return this;
+ }
- public boolean hasInstantiatesCanonical() {
- if (this.instantiatesCanonical == null)
- return false;
- for (CanonicalType item : this.instantiatesCanonical)
- if (!item.isEmpty())
- return true;
+ public boolean hasInstantiatesCanonical() {
+ if (this.instantiatesCanonical == null)
return false;
- }
+ for (CanonicalType item : this.instantiatesCanonical)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- /**
- * @return {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public CanonicalType addInstantiatesCanonicalElement() {//2
- CanonicalType t = new CanonicalType();
- if (this.instantiatesCanonical == null)
- this.instantiatesCanonical = new ArrayList();
- this.instantiatesCanonical.add(t);
- return t;
- }
+ /**
+ * @return {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public CanonicalType addInstantiatesCanonicalElement() {//2
+ CanonicalType t = new CanonicalType();
+ if (this.instantiatesCanonical == null)
+ this.instantiatesCanonical = new ArrayList();
+ this.instantiatesCanonical.add(t);
+ return t;
+ }
- /**
- * @param value {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public MedicationRequest addInstantiatesCanonical(String value) { //1
- CanonicalType t = new CanonicalType();
- t.setValue(value);
- if (this.instantiatesCanonical == null)
- this.instantiatesCanonical = new ArrayList();
- this.instantiatesCanonical.add(t);
- return this;
- }
+ /**
+ * @param value {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public MedicationRequest addInstantiatesCanonical(String value) { //1
+ CanonicalType t = new CanonicalType();
+ t.setValue(value);
+ if (this.instantiatesCanonical == null)
+ this.instantiatesCanonical = new ArrayList();
+ this.instantiatesCanonical.add(t);
+ return this;
+ }
- /**
- * @param value {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public boolean hasInstantiatesCanonical(String value) {
- if (this.instantiatesCanonical == null)
- return false;
- for (CanonicalType v : this.instantiatesCanonical)
- if (v.getValue().equals(value)) // canonical
- return true;
+ /**
+ * @param value {@link #instantiatesCanonical} (The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public boolean hasInstantiatesCanonical(String value) {
+ if (this.instantiatesCanonical == null)
return false;
- }
+ for (CanonicalType v : this.instantiatesCanonical)
+ if (v.getValue().equals(value)) // canonical
+ return true;
+ return false;
+ }
- /**
- * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public List getInstantiatesUri() {
- if (this.instantiatesUri == null)
- this.instantiatesUri = new ArrayList();
- return this.instantiatesUri;
- }
+ /**
+ * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public List getInstantiatesUri() {
+ if (this.instantiatesUri == null)
+ this.instantiatesUri = new ArrayList();
+ return this.instantiatesUri;
+ }
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setInstantiatesUri(List theInstantiatesUri) {
- this.instantiatesUri = theInstantiatesUri;
- return this;
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setInstantiatesUri(List theInstantiatesUri) {
+ this.instantiatesUri = theInstantiatesUri;
+ return this;
+ }
- public boolean hasInstantiatesUri() {
- if (this.instantiatesUri == null)
- return false;
- for (UriType item : this.instantiatesUri)
- if (!item.isEmpty())
- return true;
+ public boolean hasInstantiatesUri() {
+ if (this.instantiatesUri == null)
return false;
- }
+ for (UriType item : this.instantiatesUri)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- /**
- * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public UriType addInstantiatesUriElement() {//2
- UriType t = new UriType();
- if (this.instantiatesUri == null)
- this.instantiatesUri = new ArrayList();
- this.instantiatesUri.add(t);
- return t;
- }
+ /**
+ * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public UriType addInstantiatesUriElement() {//2
+ UriType t = new UriType();
+ if (this.instantiatesUri == null)
+ this.instantiatesUri = new ArrayList();
+ this.instantiatesUri.add(t);
+ return t;
+ }
- /**
- * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public MedicationRequest addInstantiatesUri(String value) { //1
- UriType t = new UriType();
- t.setValue(value);
- if (this.instantiatesUri == null)
- this.instantiatesUri = new ArrayList();
- this.instantiatesUri.add(t);
- return this;
- }
+ /**
+ * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public MedicationRequest addInstantiatesUri(String value) { //1
+ UriType t = new UriType();
+ t.setValue(value);
+ if (this.instantiatesUri == null)
+ this.instantiatesUri = new ArrayList();
+ this.instantiatesUri.add(t);
+ return this;
+ }
- /**
- * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
- */
- public boolean hasInstantiatesUri(String value) {
- if (this.instantiatesUri == null)
- return false;
- for (UriType v : this.instantiatesUri)
- if (v.getValue().equals(value)) // uri
- return true;
+ /**
+ * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.)
+ */
+ public boolean hasInstantiatesUri(String value) {
+ if (this.instantiatesUri == null)
return false;
- }
+ for (UriType v : this.instantiatesUri)
+ if (v.getValue().equals(value)) // uri
+ return true;
+ return false;
+ }
- /**
- * @return {@link #basedOn} (A plan or request that is fulfilled in whole or in part by this medication request.)
- */
- public List getBasedOn() {
- if (this.basedOn == null)
- this.basedOn = new ArrayList();
- return this.basedOn;
- }
+ /**
+ * @return {@link #basedOn} (A plan or request that is fulfilled in whole or in part by this medication request.)
+ */
+ public List getBasedOn() {
+ if (this.basedOn == null)
+ this.basedOn = new ArrayList();
+ return this.basedOn;
+ }
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setBasedOn(List theBasedOn) {
- this.basedOn = theBasedOn;
- return this;
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setBasedOn(List theBasedOn) {
+ this.basedOn = theBasedOn;
+ return this;
+ }
- public boolean hasBasedOn() {
- if (this.basedOn == null)
- return false;
- for (Reference item : this.basedOn)
- if (!item.isEmpty())
- return true;
+ public boolean hasBasedOn() {
+ if (this.basedOn == null)
return false;
- }
+ for (Reference item : this.basedOn)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- public Reference addBasedOn() { //3
- Reference t = new Reference();
- if (this.basedOn == null)
- this.basedOn = new ArrayList();
- this.basedOn.add(t);
- return t;
- }
+ public Reference addBasedOn() { //3
+ Reference t = new Reference();
+ if (this.basedOn == null)
+ this.basedOn = new ArrayList();
+ this.basedOn.add(t);
+ return t;
+ }
- public MedicationRequest addBasedOn(Reference t) { //3
- if (t == null)
- return this;
- if (this.basedOn == null)
- this.basedOn = new ArrayList();
- this.basedOn.add(t);
+ public MedicationRequest addBasedOn(Reference t) { //3
+ if (t == null)
return this;
- }
+ if (this.basedOn == null)
+ this.basedOn = new ArrayList();
+ this.basedOn.add(t);
+ return this;
+ }
- /**
- * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist
- */
- public Reference getBasedOnFirstRep() {
- if (getBasedOn().isEmpty()) {
- addBasedOn();
- }
- return getBasedOn().get(0);
+ /**
+ * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist
+ */
+ public Reference getBasedOnFirstRep() {
+ if (getBasedOn().isEmpty()) {
+ addBasedOn();
}
+ return getBasedOn().get(0);
+ }
- /**
- * @deprecated Use Reference#setResource(IBaseResource) instead
- */
- @Deprecated
- public List getBasedOnTarget() {
- if (this.basedOnTarget == null)
- this.basedOnTarget = new ArrayList();
- return this.basedOnTarget;
- }
+ /**
+ * @deprecated Use Reference#setResource(IBaseResource) instead
+ */
+ @Deprecated
+ public List getBasedOnTarget() {
+ if (this.basedOnTarget == null)
+ this.basedOnTarget = new ArrayList();
+ return this.basedOnTarget;
+ }
- /**
- * @return {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.)
- */
- public Identifier getGroupIdentifier() {
- if (this.groupIdentifier == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.groupIdentifier");
- else if (Configuration.doAutoCreate())
- this.groupIdentifier = new Identifier(); // cc
- return this.groupIdentifier;
- }
+ /**
+ * @return {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.)
+ */
+ public Identifier getGroupIdentifier() {
+ if (this.groupIdentifier == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.groupIdentifier");
+ else if (Configuration.doAutoCreate())
+ this.groupIdentifier = new Identifier(); // cc
+ return this.groupIdentifier;
+ }
- public boolean hasGroupIdentifier() {
- return this.groupIdentifier != null && !this.groupIdentifier.isEmpty();
- }
+ public boolean hasGroupIdentifier() {
+ return this.groupIdentifier != null && !this.groupIdentifier.isEmpty();
+ }
- /**
- * @param value {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.)
- */
- public MedicationRequest setGroupIdentifier(Identifier value) {
- this.groupIdentifier = value;
- return this;
- }
+ /**
+ * @param value {@link #groupIdentifier} (A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.)
+ */
+ public MedicationRequest setGroupIdentifier(Identifier value) {
+ this.groupIdentifier = value;
+ return this;
+ }
- /**
- * @return {@link #courseOfTherapyType} (The description of the overall patte3rn of the administration of the medication to the patient.)
- */
- public CodeableConcept getCourseOfTherapyType() {
- if (this.courseOfTherapyType == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create MedicationRequest.courseOfTherapyType");
- else if (Configuration.doAutoCreate())
- this.courseOfTherapyType = new CodeableConcept(); // cc
- return this.courseOfTherapyType;
- }
+ /**
+ * @return {@link #courseOfTherapyType} (The description of the overall patte3rn of the administration of the medication to the patient.)
+ */
+ public CodeableConcept getCourseOfTherapyType() {
+ if (this.courseOfTherapyType == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create MedicationRequest.courseOfTherapyType");
+ else if (Configuration.doAutoCreate())
+ this.courseOfTherapyType = new CodeableConcept(); // cc
+ return this.courseOfTherapyType;
+ }
- public boolean hasCourseOfTherapyType() {
- return this.courseOfTherapyType != null && !this.courseOfTherapyType.isEmpty();
- }
+ public boolean hasCourseOfTherapyType() {
+ return this.courseOfTherapyType != null && !this.courseOfTherapyType.isEmpty();
+ }
- /**
- * @param value {@link #courseOfTherapyType} (The description of the overall patte3rn of the administration of the medication to the patient.)
- */
- public MedicationRequest setCourseOfTherapyType(CodeableConcept value) {
- this.courseOfTherapyType = value;
- return this;
- }
+ /**
+ * @param value {@link #courseOfTherapyType} (The description of the overall patte3rn of the administration of the medication to the patient.)
+ */
+ public MedicationRequest setCourseOfTherapyType(CodeableConcept value) {
+ this.courseOfTherapyType = value;
+ return this;
+ }
- /**
- * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.)
- */
- public List getInsurance() {
- if (this.insurance == null)
- this.insurance = new ArrayList();
- return this.insurance;
- }
+ /**
+ * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.)
+ */
+ public List getInsurance() {
+ if (this.insurance == null)
+ this.insurance = new ArrayList();
+ return this.insurance;
+ }
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setInsurance(List theInsurance) {
- this.insurance = theInsurance;
- return this;
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setInsurance(List theInsurance) {
+ this.insurance = theInsurance;
+ return this;
+ }
- public boolean hasInsurance() {
- if (this.insurance == null)
- return false;
- for (Reference item : this.insurance)
- if (!item.isEmpty())
- return true;
+ public boolean hasInsurance() {
+ if (this.insurance == null)
return false;
- }
+ for (Reference item : this.insurance)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- public Reference addInsurance() { //3
- Reference t = new Reference();
- if (this.insurance == null)
- this.insurance = new ArrayList();
- this.insurance.add(t);
- return t;
- }
+ public Reference addInsurance() { //3
+ Reference t = new Reference();
+ if (this.insurance == null)
+ this.insurance = new ArrayList();
+ this.insurance.add(t);
+ return t;
+ }
- public MedicationRequest addInsurance(Reference t) { //3
- if (t == null)
- return this;
- if (this.insurance == null)
- this.insurance = new ArrayList();
- this.insurance.add(t);
+ public MedicationRequest addInsurance(Reference t) { //3
+ if (t == null)
return this;
- }
+ if (this.insurance == null)
+ this.insurance = new ArrayList();
+ this.insurance.add(t);
+ return this;
+ }
- /**
- * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist
- */
- public Reference getInsuranceFirstRep() {
- if (getInsurance().isEmpty()) {
- addInsurance();
- }
- return getInsurance().get(0);
+ /**
+ * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist
+ */
+ public Reference getInsuranceFirstRep() {
+ if (getInsurance().isEmpty()) {
+ addInsurance();
}
+ return getInsurance().get(0);
+ }
- /**
- * @deprecated Use Reference#setResource(IBaseResource) instead
- */
- @Deprecated
- public List getInsuranceTarget() {
- if (this.insuranceTarget == null)
- this.insuranceTarget = new ArrayList();
- return this.insuranceTarget;
- }
+ /**
+ * @deprecated Use Reference#setResource(IBaseResource) instead
+ */
+ @Deprecated
+ public List getInsuranceTarget() {
+ if (this.insuranceTarget == null)
+ this.insuranceTarget = new ArrayList();
+ return this.insuranceTarget;
+ }
- /**
- * @return {@link #note} (Extra information about the prescription that could not be conveyed by the other attributes.)
- */
- public List getNote() {
- if (this.note == null)
- this.note = new ArrayList();
- return this.note;
- }
+ /**
+ * @return {@link #note} (Extra information about the prescription that could not be conveyed by the other attributes.)
+ */
+ public List getNote() {
+ if (this.note == null)
+ this.note = new ArrayList();
+ return this.note;
+ }
- /**
- * @return Returns a reference to this
for easy method chaining
- */
- public MedicationRequest setNote(List theNote) {
- this.note = theNote;
- return this;
- }
+ /**
+ * @return Returns a reference to this
for easy method chaining
+ */
+ public MedicationRequest setNote(List theNote) {
+ this.note = theNote;
+ return this;
+ }
- public boolean hasNote() {
- if (this.note == null)
- return false;
- for (Annotation item : this.note)
- if (!item.isEmpty())
- return true;
+ public boolean hasNote() {
+ if (this.note == null)
return false;
- }
+ for (Annotation item : this.note)
+ if (!item.isEmpty())
+ return true;
+ return false;
+ }
- public Annotation addNote() { //3
- Annotation t = new Annotation();
- if (this.note == null)
- this.note = new ArrayList();
- this.note.add(t);
- return t;
- }
+ public Annotation addNote() { //3
+ Annotation t = new Annotation();
+ if (this.note == null)
+ this.note = new ArrayList();
+ this.note.add(t);
+ return t;
+ }
- public MedicationRequest addNote(Annotation t) { //3
- if (t == null)
- return this;
- if (this.note == null)
- this.note = new ArrayList