diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategory.java deleted file mode 100644 index 023741d0075..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategory.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.exceptions.FHIRException; - -public enum MedicationDispenseCategory { - - /** - * Includes dispenses for medications to be administered or consumed in an inpatient or acute care setting. - */ - INPATIENT, - /** - * Includes dispenses for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office). - */ - OUTPATIENT, - /** - * Includes dispenses for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc.). - */ - COMMUNITY, - /** - * Includes dispenses for medications created when the patient is being released from a facility. - */ - DISCHARGE, - /** - * added to help the parsers - */ - NULL; - public static MedicationDispenseCategory fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("inpatient".equals(codeString)) - return INPATIENT; - if ("outpatient".equals(codeString)) - return OUTPATIENT; - if ("community".equals(codeString)) - return COMMUNITY; - if ("discharge".equals(codeString)) - return DISCHARGE; - throw new FHIRException("Unknown MedicationDispenseCategory code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case INPATIENT: return "inpatient"; - case OUTPATIENT: return "outpatient"; - case COMMUNITY: return "community"; - case DISCHARGE: return "discharge"; - default: return "?"; - } - } - public String getSystem() { - return "http://terminology.hl7.org/CodeSystem/medication-dispense-category"; - } - public String getDefinition() { - switch (this) { - case INPATIENT: return "Includes dispenses for medications to be administered or consumed in an inpatient or acute care setting."; - case OUTPATIENT: return "Includes dispenses for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office)."; - case COMMUNITY: return "Includes dispenses for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc.)."; - case DISCHARGE: return "Includes dispenses for medications created when the patient is being released from a facility."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case INPATIENT: return "Inpatient"; - case OUTPATIENT: return "Outpatient"; - case COMMUNITY: return "Community"; - case DISCHARGE: return "Discharge"; - default: return "?"; - } - } - - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategoryEnumFactory.java deleted file mode 100644 index c2401cfa699..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseCategoryEnumFactory.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.r4.model.EnumFactory; - -public class MedicationDispenseCategoryEnumFactory implements EnumFactory { - - public MedicationDispenseCategory fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - return null; - if ("inpatient".equals(codeString)) - return MedicationDispenseCategory.INPATIENT; - if ("outpatient".equals(codeString)) - return MedicationDispenseCategory.OUTPATIENT; - if ("community".equals(codeString)) - return MedicationDispenseCategory.COMMUNITY; - if ("discharge".equals(codeString)) - return MedicationDispenseCategory.DISCHARGE; - throw new IllegalArgumentException("Unknown MedicationDispenseCategory code '"+codeString+"'"); - } - - public String toCode(MedicationDispenseCategory code) { - if (code == MedicationDispenseCategory.INPATIENT) - return "inpatient"; - if (code == MedicationDispenseCategory.OUTPATIENT) - return "outpatient"; - if (code == MedicationDispenseCategory.COMMUNITY) - return "community"; - if (code == MedicationDispenseCategory.DISCHARGE) - return "discharge"; - return "?"; - } - - public String toSystem(MedicationDispenseCategory code) { - return code.getSystem(); - } - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatus.java deleted file mode 100644 index ca760c84aa2..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatus.java +++ /dev/null @@ -1,141 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.exceptions.FHIRException; - -public enum MedicationDispenseStatus { - - /** - * The core event has not started yet, but some staging activities have begun (e.g. initial compounding or packaging of medication). Preparation stages may be tracked for billing purposes. - */ - PREPARATION, - /** - * The dispensed product is ready for pickup. - */ - INPROGRESS, - /** - * The dispensed product was not and will never be picked up by the patient. - */ - CANCELLED, - /** - * The dispense process is paused while waiting for an external event to reactivate the dispense. For example, new stock has arrived or the prescriber has called. - */ - ONHOLD, - /** - * The dispensed product has been picked up. - */ - COMPLETED, - /** - * The dispense was entered in error and therefore nullified. - */ - ENTEREDINERROR, - /** - * Actions implied by the dispense have been permanently halted, before all of them occurred. - */ - STOPPED, - /** - * The authoring system does not know which of the status values applies for this medication dispense. Note: this concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just now known which one. - */ - UNKNOWN, - /** - * added to help the parsers - */ - NULL; - public static MedicationDispenseStatus fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("preparation".equals(codeString)) - return PREPARATION; - if ("in-progress".equals(codeString)) - return INPROGRESS; - if ("cancelled".equals(codeString)) - return CANCELLED; - if ("on-hold".equals(codeString)) - return ONHOLD; - if ("completed".equals(codeString)) - return COMPLETED; - if ("entered-in-error".equals(codeString)) - return ENTEREDINERROR; - if ("stopped".equals(codeString)) - return STOPPED; - if ("unknown".equals(codeString)) - return UNKNOWN; - throw new FHIRException("Unknown MedicationDispenseStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case PREPARATION: return "preparation"; - case INPROGRESS: return "in-progress"; - case CANCELLED: return "cancelled"; - case ONHOLD: return "on-hold"; - case COMPLETED: return "completed"; - case ENTEREDINERROR: return "entered-in-error"; - case STOPPED: return "stopped"; - case UNKNOWN: return "unknown"; - default: return "?"; - } - } - public String getSystem() { - return "http://hl7.org/fhir/medication-dispense-status"; - } - public String getDefinition() { - switch (this) { - case PREPARATION: return "The core event has not started yet, but some staging activities have begun (e.g. initial compounding or packaging of medication). Preparation stages may be tracked for billing purposes."; - case INPROGRESS: return "The dispensed product is ready for pickup."; - case CANCELLED: return "The dispensed product was not and will never be picked up by the patient."; - case ONHOLD: return "The dispense process is paused while waiting for an external event to reactivate the dispense. For example, new stock has arrived or the prescriber has called."; - case COMPLETED: return "The dispensed product has been picked up."; - case ENTEREDINERROR: return "The dispense was entered in error and therefore nullified."; - case STOPPED: return "Actions implied by the dispense have been permanently halted, before all of them occurred."; - case UNKNOWN: return "The authoring system does not know which of the status values applies for this medication dispense. Note: this concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just now known which one."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case PREPARATION: return "Preparation"; - case INPROGRESS: return "In Progress"; - case CANCELLED: return "Cancelled"; - case ONHOLD: return "On Hold"; - case COMPLETED: return "Completed"; - case ENTEREDINERROR: return "Entered in-Error"; - case STOPPED: return "Stopped"; - case UNKNOWN: return "Unknown"; - default: return "?"; - } - } - - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatusEnumFactory.java deleted file mode 100644 index a238e2e0808..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationDispenseStatusEnumFactory.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.r4.model.EnumFactory; - -public class MedicationDispenseStatusEnumFactory implements EnumFactory { - - public MedicationDispenseStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - return null; - if ("preparation".equals(codeString)) - return MedicationDispenseStatus.PREPARATION; - if ("in-progress".equals(codeString)) - return MedicationDispenseStatus.INPROGRESS; - if ("cancelled".equals(codeString)) - return MedicationDispenseStatus.CANCELLED; - if ("on-hold".equals(codeString)) - return MedicationDispenseStatus.ONHOLD; - if ("completed".equals(codeString)) - return MedicationDispenseStatus.COMPLETED; - if ("entered-in-error".equals(codeString)) - return MedicationDispenseStatus.ENTEREDINERROR; - if ("stopped".equals(codeString)) - return MedicationDispenseStatus.STOPPED; - if ("unknown".equals(codeString)) - return MedicationDispenseStatus.UNKNOWN; - throw new IllegalArgumentException("Unknown MedicationDispenseStatus code '"+codeString+"'"); - } - - public String toCode(MedicationDispenseStatus code) { - if (code == MedicationDispenseStatus.PREPARATION) - return "preparation"; - if (code == MedicationDispenseStatus.INPROGRESS) - return "in-progress"; - if (code == MedicationDispenseStatus.CANCELLED) - return "cancelled"; - if (code == MedicationDispenseStatus.ONHOLD) - return "on-hold"; - if (code == MedicationDispenseStatus.COMPLETED) - return "completed"; - if (code == MedicationDispenseStatus.ENTEREDINERROR) - return "entered-in-error"; - if (code == MedicationDispenseStatus.STOPPED) - return "stopped"; - if (code == MedicationDispenseStatus.UNKNOWN) - return "unknown"; - return "?"; - } - - public String toSystem(MedicationDispenseStatus code) { - return code.getSystem(); - } - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationKnowledgeStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationKnowledgeStatus.java deleted file mode 100644 index 40980f1452c..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationKnowledgeStatus.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.exceptions.FHIRException; - -public enum MedicationKnowledgeStatus { - - /** - * The medication is available for use. - */ - ACTIVE, - /** - * The medication is not available for use. - */ - INACTIVE, - /** - * The medication was entered in error. - */ - ENTEREDINERROR, - /** - * added to help the parsers - */ - NULL; - public static MedicationKnowledgeStatus fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("active".equals(codeString)) - return ACTIVE; - if ("inactive".equals(codeString)) - return INACTIVE; - if ("entered-in-error".equals(codeString)) - return ENTEREDINERROR; - throw new FHIRException("Unknown MedicationKnowledgeStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case ACTIVE: return "active"; - case INACTIVE: return "inactive"; - case ENTEREDINERROR: return "entered-in-error"; - default: return "?"; - } - } - public String getSystem() { - return "http://hl7.org/fhir/medicationKnowledge-status"; - } - public String getDefinition() { - switch (this) { - case ACTIVE: return "The medication is available for use."; - case INACTIVE: return "The medication is not available for use."; - case ENTEREDINERROR: return "The medication was entered in error."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case ACTIVE: return "Active"; - case INACTIVE: return "Inactive"; - case ENTEREDINERROR: return "Entered in Error"; - default: return "?"; - } - } - - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationKnowledgeStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationKnowledgeStatusEnumFactory.java deleted file mode 100644 index b03aa567532..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationKnowledgeStatusEnumFactory.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.r4.model.EnumFactory; - -public class MedicationKnowledgeStatusEnumFactory implements EnumFactory { - - public MedicationKnowledgeStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - return null; - if ("active".equals(codeString)) - return MedicationKnowledgeStatus.ACTIVE; - if ("inactive".equals(codeString)) - return MedicationKnowledgeStatus.INACTIVE; - if ("entered-in-error".equals(codeString)) - return MedicationKnowledgeStatus.ENTEREDINERROR; - throw new IllegalArgumentException("Unknown MedicationKnowledgeStatus code '"+codeString+"'"); - } - - public String toCode(MedicationKnowledgeStatus code) { - if (code == MedicationKnowledgeStatus.ACTIVE) - return "active"; - if (code == MedicationKnowledgeStatus.INACTIVE) - return "inactive"; - if (code == MedicationKnowledgeStatus.ENTEREDINERROR) - return "entered-in-error"; - return "?"; - } - - public String toSystem(MedicationKnowledgeStatus code) { - return code.getSystem(); - } - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategory.java deleted file mode 100644 index 5eb65c567b1..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategory.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.exceptions.FHIRException; - -public enum MedicationRequestCategory { - - /** - * Includes requests for medications to be administered or consumed in an inpatient or acute care setting. - */ - INPATIENT, - /** - * Includes requests for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office). - */ - OUTPATIENT, - /** - * Includes requests for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc.). - */ - COMMUNITY, - /** - * Includes requests for medications created when the patient is being released from a facility. - */ - DISCHARGE, - /** - * added to help the parsers - */ - NULL; - public static MedicationRequestCategory fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("inpatient".equals(codeString)) - return INPATIENT; - if ("outpatient".equals(codeString)) - return OUTPATIENT; - if ("community".equals(codeString)) - return COMMUNITY; - if ("discharge".equals(codeString)) - return DISCHARGE; - throw new FHIRException("Unknown MedicationRequestCategory code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case INPATIENT: return "inpatient"; - case OUTPATIENT: return "outpatient"; - case COMMUNITY: return "community"; - case DISCHARGE: return "discharge"; - default: return "?"; - } - } - public String getSystem() { - return "http://terminology.hl7.org/CodeSystem/medication-request-category"; - } - public String getDefinition() { - switch (this) { - case INPATIENT: return "Includes requests for medications to be administered or consumed in an inpatient or acute care setting."; - case OUTPATIENT: return "Includes requests for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office)."; - case COMMUNITY: return "Includes requests for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc.)."; - case DISCHARGE: return "Includes requests for medications created when the patient is being released from a facility."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case INPATIENT: return "Inpatient"; - case OUTPATIENT: return "Outpatient"; - case COMMUNITY: return "Community"; - case DISCHARGE: return "Discharge"; - default: return "?"; - } - } - - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategoryEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategoryEnumFactory.java deleted file mode 100644 index ebe7200bdc0..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestCategoryEnumFactory.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.r4.model.EnumFactory; - -public class MedicationRequestCategoryEnumFactory implements EnumFactory { - - public MedicationRequestCategory fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - return null; - if ("inpatient".equals(codeString)) - return MedicationRequestCategory.INPATIENT; - if ("outpatient".equals(codeString)) - return MedicationRequestCategory.OUTPATIENT; - if ("community".equals(codeString)) - return MedicationRequestCategory.COMMUNITY; - if ("discharge".equals(codeString)) - return MedicationRequestCategory.DISCHARGE; - throw new IllegalArgumentException("Unknown MedicationRequestCategory code '"+codeString+"'"); - } - - public String toCode(MedicationRequestCategory code) { - if (code == MedicationRequestCategory.INPATIENT) - return "inpatient"; - if (code == MedicationRequestCategory.OUTPATIENT) - return "outpatient"; - if (code == MedicationRequestCategory.COMMUNITY) - return "community"; - if (code == MedicationRequestCategory.DISCHARGE) - return "discharge"; - return "?"; - } - - public String toSystem(MedicationRequestCategory code) { - return code.getSystem(); - } - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntent.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntent.java deleted file mode 100644 index 1efa9ae492a..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntent.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.exceptions.FHIRException; - -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 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 - */ - 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 ("instance-order".equals(codeString)) - return INSTANCEORDER; - if ("option".equals(codeString)) - return OPTION; - 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 INSTANCEORDER: return "instance-order"; - case OPTION: return "option"; - default: return "?"; - } - } - public String getSystem() { - return "http://hl7.org/fhir/medication-request-intent"; - } - 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 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 INSTANCEORDER: return "Instance Order"; - case OPTION: return "Option"; - default: return "?"; - } - } - - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntentEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntentEnumFactory.java deleted file mode 100644 index f137321928f..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestIntentEnumFactory.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.r4.model.EnumFactory; - -public class MedicationRequestIntentEnumFactory implements EnumFactory { - - public MedicationRequestIntent fromCode(String codeString) throws IllegalArgumentException { - 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 ("instance-order".equals(codeString)) - return MedicationRequestIntent.INSTANCEORDER; - if ("option".equals(codeString)) - return MedicationRequestIntent.OPTION; - throw new IllegalArgumentException("Unknown MedicationRequestIntent code '"+codeString+"'"); - } - - public String toCode(MedicationRequestIntent code) { - if (code == MedicationRequestIntent.PROPOSAL) - return "proposal"; - if (code == MedicationRequestIntent.PLAN) - return "plan"; - if (code == MedicationRequestIntent.ORDER) - return "order"; - if (code == MedicationRequestIntent.ORIGINALORDER) - return "original-order"; - if (code == MedicationRequestIntent.INSTANCEORDER) - return "instance-order"; - if (code == MedicationRequestIntent.OPTION) - return "option"; - return "?"; - } - - public String toSystem(MedicationRequestIntent code) { - return code.getSystem(); - } - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatus.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatus.java deleted file mode 100644 index dcd8aa466da..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatus.java +++ /dev/null @@ -1,141 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.exceptions.FHIRException; - -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 system does not know which of the status values currently applies for this request. - */ - UNKNOWN, - /** - * added to help the parsers - */ - 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; - 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() { - return "http://hl7.org/fhir/medication-request-status"; - } - 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 system does not know which of the status values currently applies for this request."; - 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 "?"; - } - } - - -} - diff --git a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatusEnumFactory.java b/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatusEnumFactory.java deleted file mode 100644 index 571e75a9a1f..00000000000 --- a/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/MedicationRequestStatusEnumFactory.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.hl7.fhir.r4.model.codesystems; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - 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 - 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 - 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 - 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 - POSSIBILITY OF SUCH DAMAGE. - -*/ - -// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 - - -import org.hl7.fhir.r4.model.EnumFactory; - -public class MedicationRequestStatusEnumFactory implements EnumFactory { - - public MedicationRequestStatus fromCode(String codeString) throws IllegalArgumentException { - 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 String toCode(MedicationRequestStatus code) { - if (code == MedicationRequestStatus.ACTIVE) - return "active"; - if (code == MedicationRequestStatus.ONHOLD) - return "on-hold"; - if (code == MedicationRequestStatus.CANCELLED) - return "cancelled"; - if (code == MedicationRequestStatus.COMPLETED) - return "completed"; - if (code == MedicationRequestStatus.ENTEREDINERROR) - return "entered-in-error"; - if (code == MedicationRequestStatus.STOPPED) - return "stopped"; - if (code == MedicationRequestStatus.DRAFT) - return "draft"; - if (code == MedicationRequestStatus.UNKNOWN) - return "unknown"; - return "?"; - } - - public String toSystem(MedicationRequestStatus code) { - return code.getSystem(); - } - -} -