Skip to content

Commit

Permalink
Fine tuning for Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
keithboone committed Aug 29, 2024
1 parent 3096b84 commit e77fc03
Show file tree
Hide file tree
Showing 3 changed files with 4,218 additions and 7 deletions.
13 changes: 8 additions & 5 deletions src/main/java/gov/cdc/izgw/v2tofhir/utils/Codes.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,29 @@ public class Codes {
*/

public static final CodeableConcept ASSEMBLER_AGENT = new CodeableConcept().addCoding(new Coding("http://terminology.hl7.org/CodeSystem/provenance-participant-type", "assembler", "Assembler"));

private static final String V2TABLES = "http://terminology.hl7.org/CodeSystem/v2-";

/**
* The function code for an Ordering Provider
*/
public static final CodeableConcept ORDERING_PROVIDER_FUNCTION_CODE =
new CodeableConcept().addCoding(new Coding(Mapping.v2Table("0433"), "OP", "Ordering Provider"));
new CodeableConcept().addCoding(new Coding(V2TABLES + "0433", "OP", "Ordering Provider"));
/**
* The function code for an Administrating Provider
*/
public static final CodeableConcept ADMIN_PROVIDER_FUNCTION_CODE =
new CodeableConcept().addCoding(new Coding(Mapping.v2Table("0433"), "AP", "Administrating Provider"));
new CodeableConcept().addCoding(new Coding(V2TABLES + "0433", "AP", "Administrating Provider"));

/**
* The role code for the Medical Director of laboratory or other observation producing facility.
*/
public static final CodeableConcept MEDICAL_DIRECTOR_ROLE_CODE =
new CodeableConcept().addCoding(new Coding(Mapping.v2Table("0912"), "MDIR", "Medical Director"));
new CodeableConcept().addCoding(new Coding(V2TABLES + "0912", "MDIR", "Medical Director"));

/** The code for a Social Security Number found on Identifier.type */
public static final CodeableConcept SSN_TYPE = new CodeableConcept().addCoding(
new Coding("http://terminology.hl7.org/CodeSystem/v2-0203", "SS", "Social Security Number")
new Coding(V2TABLES + "0203", "SS", "Social Security Number")
);

/** The concept of MOTHER */
Expand Down Expand Up @@ -103,7 +106,7 @@ public class Codes {
/** Visit Number */
public static final CodeableConcept VISIT_NUMBER = new CodeableConcept()
.addCoding(
new Coding(Mapping.v2Table("0203"), "VN", "visit number")
new Coding(V2TABLES + "0203", "VN", "visit number")
);

private Codes() {}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/gov/cdc/izgw/v2tofhir/utils/IzQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ public void update() throws HL7Exception {
rcp.getQuantityLimitedRequest().getUnits().getNameOfCodingSystem().setValue("HL70126");

if (!isHasId() &&
(getName().isEmpty() || getGender().isEmpty() || getBirthDate().isEmpty()) ) {
(getName().isEmpty() ||
getBirthDate().isEmpty()) ) {
throw new IllegalArgumentException("A query must contain either a "
+ "patient.identifier or the patient name, gender, and birthDate");
+ "patient.identifier or the patient name and birthDate");
}
}

Expand Down
Loading

0 comments on commit e77fc03

Please sign in to comment.