Merge pull request #885 from hapifhir/pw/add-snapshot2-version

adding missing "5.0.0-snapshot2" to enumerations
This commit is contained in:
Grahame Grieve 2022-08-03 06:15:46 +10:00 committed by GitHub
commit 145abca287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 6 deletions

View File

@ -3490,8 +3490,8 @@ public class Enumerations {
*/
MEDICATIONREQUEST,
/**
* A record of a medication that is being consumed by a patient. A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains.
* A record of a medication that is being consumed by a patient. A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains.
The primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medicationusage is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the Medication Usage information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information.
*/
MEDICATIONUSAGE,
@ -6699,8 +6699,12 @@ The primary difference between a medicationusage and a medicationadministration
/**
* R5 Snapshot1
*/
_5_0_0SNAPSHOT1,
_5_0_0SNAPSHOT1,
/**
* R5 Snapshot2
*/
_5_0_0SNAPSHOT2,
/**
* added to help the parsers
*/
NULL;
@ -6813,6 +6817,8 @@ The primary difference between a medicationusage and a medicationadministration
return _5_0_0CIBUILD;
if ("5.0.0-snapshot1".equals(codeString))
return _5_0_0SNAPSHOT1;
if ("5.0.0-snapshot2".equals(codeString))
return _5_0_0SNAPSHOT2;
throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
}
public String toCode() {
@ -6870,6 +6876,7 @@ The primary difference between a medicationusage and a medicationadministration
case _5_0_0: return "5.0.0";
case _5_0_0CIBUILD: return "5.0.0-cibuild";
case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
case _5_0_0SNAPSHOT2: return "5.0.0-snapshot2";
case NULL: return null;
default: return "?";
}
@ -6929,6 +6936,7 @@ The primary difference between a medicationusage and a medicationadministration
case _5_0_0: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0CIBUILD: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
case _5_0_0SNAPSHOT2: return "http://hl7.org/fhir/FHIR-version";
case NULL: return null;
default: return "?";
}
@ -6988,6 +6996,7 @@ The primary difference between a medicationusage and a medicationadministration
case _5_0_0: return "R5";
case _5_0_0CIBUILD: return "R5 CIBuild";
case _5_0_0SNAPSHOT1: return "R5 Snapshot1";
case _5_0_0SNAPSHOT2: return "R5 Snapshot2";
case NULL: return null;
default: return "?";
}
@ -7047,6 +7056,7 @@ The primary difference between a medicationusage and a medicationadministration
case _5_0_0: return "5.0.0";
case _5_0_0CIBUILD: return "5.0.0-cibuild";
case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
case _5_0_0SNAPSHOT2: return "5.0.0-snapshot2";
case NULL: return null;
default: return "?";
}
@ -7064,7 +7074,7 @@ The primary difference between a medicationusage and a medicationadministration
public static boolean isValidCode(String codeString) {
return Utilities.existsInList(codeString, "0.01", "0.05", "0.06", "0.11", "0.0.80", "0.0.81" ,"0.0.82", "0.4.0", "0.5.0",
"1.0.0", "1.0.1", "1.0.2", "1.1.0", "1.4.0", "1.6.0", "1.8.0", "3.0.0", "3.0.1", "3.0.2", "3.3.0", "3.5.0",
"4.0.0", "4.0.1", "4.1.0" ,"4.2.0" ,"4.3.0-snapshot1" ,"4.3.0-cibuild" ,"4.3.0", "5.0.0", "5.0.0-cibuild", "5.0.0-snapshot1");
"4.0.0", "4.0.1", "4.1.0" ,"4.2.0" ,"4.3.0-snapshot1" ,"4.3.0-cibuild" ,"4.3.0", "5.0.0", "5.0.0-cibuild", "5.0.0-snapshot1", "5.0.0-snapshot2");
}
@ -7192,6 +7202,8 @@ The primary difference between a medicationusage and a medicationadministration
return FHIRVersion._5_0_0CIBUILD;
if ("5.0.0-snapshot1".equals(codeString))
return FHIRVersion._5_0_0SNAPSHOT1;
if ("5.0.0-snapshot2".equals(codeString))
return FHIRVersion._5_0_0SNAPSHOT2;
throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'");
}
public Enumeration<FHIRVersion> fromType(Base code) throws FHIRException {
@ -7308,6 +7320,8 @@ The primary difference between a medicationusage and a medicationadministration
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0CIBUILD);
if ("5.0.0-snapshot1".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0SNAPSHOT1);
if ("5.0.0-snapshot2".equals(codeString))
return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0SNAPSHOT2);
throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
}
public String toCode(FHIRVersion code) {
@ -7417,6 +7431,8 @@ The primary difference between a medicationusage and a medicationadministration
return "5.0.0-cibuild";
if (code == FHIRVersion._5_0_0SNAPSHOT1)
return "5.0.0-snapshot1";
if (code == FHIRVersion._5_0_0SNAPSHOT2)
return "5.0.0-snapshot2";
return "?";
}
public String toSystem(FHIRVersion code) {
@ -9913,8 +9929,8 @@ The primary difference between a medicationusage and a medicationadministration
*/
MEDICATIONREQUEST,
/**
* A record of a medication that is being consumed by a patient. A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains.
* A record of a medication that is being consumed by a patient. A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains.
The primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medicationusage is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the Medication Usage information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information.
*/
MEDICATIONUSAGE,

View File

@ -12,6 +12,7 @@ import org.hl7.fhir.r5.model.CapabilityStatement;
import org.hl7.fhir.r5.model.CodeSystem;
import org.hl7.fhir.r5.model.CompartmentDefinition;
import org.hl7.fhir.r5.model.ConceptMap;
import org.hl7.fhir.r5.model.Constants;
import org.hl7.fhir.r5.model.ExampleScenario;
import org.hl7.fhir.r5.model.GraphDefinition;
import org.hl7.fhir.r5.model.ImplementationGuide;
@ -70,4 +71,11 @@ class ResourceTests {
String output = xml.composeString(res);
assertEquals(TGT, output);
}
@Test
void testCapabilityStatementFhirVersion() {
CapabilityStatement cap = new CapabilityStatement();
cap.getFhirVersionElement().setValueAsString(Constants.VERSION);
assertEquals(Constants.VERSION, cap.getFhirVersion().getDisplay());
}
}