sync
This commit is contained in:
parent
305f93ca26
commit
a6b167a94a
|
@ -28,7 +28,7 @@ public class PackageHacker {
|
||||||
private static boolean useSecureReferences = false;
|
private static boolean useSecureReferences = false;
|
||||||
|
|
||||||
public static void main(String[] args) throws FileNotFoundException, IOException {
|
public static void main(String[] args) throws FileNotFoundException, IOException {
|
||||||
new PackageHacker().edit(args[0]);
|
new PackageHacker().edit("/Users/grahamegrieve/web/hl7.org/fhir/us/sdoh-clinicalcare/2022Jan/package.tgz");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void edit(String name) throws FileNotFoundException, IOException {
|
private void edit(String name) throws FileNotFoundException, IOException {
|
||||||
|
@ -48,6 +48,7 @@ public class PackageHacker {
|
||||||
if (pck.getFolders().containsKey("xml")) {
|
if (pck.getFolders().containsKey("xml")) {
|
||||||
fixContent(pck.getFolders().get("xml").getContent());
|
fixContent(pck.getFolders().get("xml").getContent());
|
||||||
}
|
}
|
||||||
|
fixExampleContent(pck.getFolders().get("example").getContent());
|
||||||
|
|
||||||
System.out.println("Revised Package");
|
System.out.println("Revised Package");
|
||||||
System.out.println("=======================");
|
System.out.println("=======================");
|
||||||
|
@ -61,8 +62,14 @@ public class PackageHacker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fixExampleContent(Map<String, byte[]> content) {
|
||||||
|
byte[] cnt = content.get("ServiceRequest-SDOHCC-ServiceRequestCompletedFoodPantryApplicationAssistExample.json");
|
||||||
|
content.put("ServiceRequest-SDOHCC-ServiceRequestCompletedFoodPantryApplicationAssist.json", cnt);
|
||||||
|
content.remove("ServiceRequest-SDOHCC-ServiceRequestCompletedFoodPantryApplicationAssistExample.json");
|
||||||
|
}
|
||||||
|
|
||||||
private void fixContent(Map<String, byte[]> content) {
|
private void fixContent(Map<String, byte[]> content) {
|
||||||
fixVersionInContent(content);
|
// fixVersionInContent(content);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +79,7 @@ public class PackageHacker {
|
||||||
|
|
||||||
private void change(JsonObject npm) throws FileNotFoundException, IOException {
|
private void change(JsonObject npm) throws FileNotFoundException, IOException {
|
||||||
// fixVersions(npm);
|
// fixVersions(npm);
|
||||||
npm.remove("notForPublication");
|
// npm.remove("notForPublication");
|
||||||
// npm.addProperty("url", "http://hl7.org/fhir/us/carin-rtpbc/STU1");
|
// npm.addProperty("url", "http://hl7.org/fhir/us/carin-rtpbc/STU1");
|
||||||
// npm.remove("name");
|
// npm.remove("name");
|
||||||
// npm.addProperty("name", "hl7.fhir.uv.smart-app-launch");
|
// npm.addProperty("name", "hl7.fhir.uv.smart-app-launch");
|
||||||
|
@ -95,6 +102,7 @@ public class PackageHacker {
|
||||||
// dep.addProperty("hl7.fhir.r4.examples", "4.0.1");
|
// dep.addProperty("hl7.fhir.r4.examples", "4.0.1");
|
||||||
// dep.addProperty("hl7.fhir.r4.expansions", "4.0.1");
|
// dep.addProperty("hl7.fhir.r4.expansions", "4.0.1");
|
||||||
// dep.addProperty("hl7.fhir.r4.elements", "4.0.1");
|
// dep.addProperty("hl7.fhir.r4.elements", "4.0.1");
|
||||||
|
npm.addProperty("jurisdiction", "urn:iso:std:iso:3166#US");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fixVersionInContent(Map<String, byte[]> content) {
|
private void fixVersionInContent(Map<String, byte[]> content) {
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0131",
|
||||||
|
"code" : "N"
|
||||||
|
}, "url": "http://hl7.org/fhir/ValueSet/patient-contactrelationship--0", "version": "4.3.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Next-of-Kin",
|
||||||
|
"code" : "N",
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0131"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0131",
|
||||||
|
"code" : "N"
|
||||||
|
}, "url": "http://hl7.org/fhir/ValueSet/patient-contactrelationship", "version": "4.3.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Next-of-Kin",
|
||||||
|
"code" : "N",
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0131"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0131",
|
||||||
|
"code" : "N"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Next-of-Kin",
|
||||||
|
"code" : "N",
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0131"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
|
@ -0,0 +1,31 @@
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||||
|
"code" : "MR"
|
||||||
|
}, "url": "http://hl7.org/fhir/ValueSet/identifier-type--0", "version": "4.3.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Medical record number",
|
||||||
|
"code" : "MR",
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||||
|
"code" : "MR"
|
||||||
|
}, "url": "http://hl7.org/fhir/ValueSet/identifier-type", "version": "4.3.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Medical record number",
|
||||||
|
"code" : "MR",
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
|
||||||
|
"code" : "MR"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Medical record number",
|
||||||
|
"code" : "MR",
|
||||||
|
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
Loading…
Reference in New Issue