mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-27 16:15:56 +00:00
set snomed extension in validator
This commit is contained in:
parent
a301973ce0
commit
62c1f0af77
@ -1328,7 +1328,10 @@ public class ValidationEngine implements IValidatorResourceFetcher {
|
||||
try {
|
||||
makeSnapshot(sd);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Process Note: Unable to generate snapshot for "+sd.present());
|
||||
System.out.println("Process Note: Unable to generate snapshot for "+sd.present()+": "+e.getMessage());
|
||||
if (debug) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1700,6 +1703,10 @@ public class ValidationEngine implements IValidatorResourceFetcher {
|
||||
s.close();
|
||||
}
|
||||
|
||||
public void setSnomedExtension(String sct) {
|
||||
context.getExpansionParameters().addParameter("system-version", "http://snomed.info/sct|"+sct);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -200,6 +200,11 @@ public class Validator {
|
||||
System.out.println(" Produce additional information about the loading/validation process");
|
||||
System.out.println("-recurse");
|
||||
System.out.println(" Look in subfolders when -ig refers to a folder");
|
||||
System.out.println("-sct");
|
||||
System.out.println(" Specify the edition of SNOMED CT to use. Valid Choices:");
|
||||
System.out.println(" intl | us | uk | au | nl | ca | se | dk | es");
|
||||
System.out.println(" tx.fhir.org only supports a subset. To add to this list or tx.fhir.org");
|
||||
System.out.println(" ask on https://chat.fhir.org/#narrow/stream/179202-terminology");
|
||||
System.out.println("-native: use schema for validation as well");
|
||||
System.out.println(" * XML: w3c schema+schematron");
|
||||
System.out.println(" * JSON: json.schema");
|
||||
@ -403,6 +408,7 @@ public class Validator {
|
||||
String mapLog = null;
|
||||
String lang = null;
|
||||
String fhirpath = null;
|
||||
String snomedCT = "900000000000207008";
|
||||
boolean doDebug = false;
|
||||
|
||||
// load the parameters - so order doesn't matter
|
||||
@ -439,6 +445,28 @@ public class Validator {
|
||||
doNative = true;
|
||||
} else if (args[i].equals("-debug")) {
|
||||
doDebug = true;
|
||||
} else if (args[i].equals("-sct")) {
|
||||
String s = args[++i];
|
||||
if ("intl".equalsIgnoreCase(s))
|
||||
snomedCT = "900000000000207008";
|
||||
else if ("us".equalsIgnoreCase(s))
|
||||
snomedCT = "731000124108";
|
||||
else if ("uk".equalsIgnoreCase(s))
|
||||
snomedCT = "999000041000000102";
|
||||
else if ("au".equalsIgnoreCase(s))
|
||||
snomedCT = "32506021000036107";
|
||||
else if ("ca".equalsIgnoreCase(s))
|
||||
snomedCT = "20611000087101";
|
||||
else if ("nl".equalsIgnoreCase(s))
|
||||
snomedCT = "11000146104";
|
||||
else if ("se".equalsIgnoreCase(s))
|
||||
snomedCT = "45991000052106";
|
||||
else if ("es".equalsIgnoreCase(s))
|
||||
snomedCT = "449081005";
|
||||
else if ("dk".equalsIgnoreCase(s))
|
||||
snomedCT = "554471000005108";
|
||||
else
|
||||
throw new Error("Snomed edition '"+s+"' not known");
|
||||
} else if (args[i].equals("-recurse")) {
|
||||
recursive = true;
|
||||
} else if (args[i].equals("-strictExtensions")) {
|
||||
@ -544,6 +572,7 @@ public class Validator {
|
||||
validator.setHintAboutNonMustSupport(hintAboutNonMustSupport);
|
||||
validator.setAnyExtensionsAllowed(anyExtensionsAllowed);
|
||||
validator.setLanguage(lang);
|
||||
validator.setSnomedExtension(snomedCT);
|
||||
|
||||
IParser x;
|
||||
if (output != null && output.endsWith(".json"))
|
||||
|
2
pom.xml
2
pom.xml
@ -17,7 +17,7 @@
|
||||
|
||||
<properties>
|
||||
<hapi_fhir_version>4.1.0</hapi_fhir_version>
|
||||
<validator_test_case_version>1.0.8-SNAPSHOT</validator_test_case_version>
|
||||
<validator_test_case_version>11.0.9-SNAPSHOT.0.8-SNAPSHOT</validator_test_case_version>
|
||||
</properties>
|
||||
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
|
@ -14,10 +14,10 @@ pause
|
||||
call mvn versions:set -DnewVersion=%newver%-SNAPSHOT
|
||||
call git commit -a -m "Release new version"
|
||||
call git push origin master
|
||||
call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\build" --fileMask "*.xml" --find "%oldver%-SNAPSHOT" --replace "%newver%-SNAPSHOT"
|
||||
call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\fhir-ig-publisher" --fileMask "*.xml" --find "%oldver%-SNAPSHOT" --replace "%newver%-SNAPSHOT"
|
||||
call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\latest-ig-publisher" --fileMask "*.html" --find "%oldver%" --replace "%newver%"
|
||||
call "C:\tools\fnr.exe" --cl --dir "C:\work\org.hl7.fhir\latest-ig-publisher" --fileMask "*.json" --find "%oldver%" --replace "%newver%"
|
||||
call "C:\tools\fnr.exe" -dir "C:\work\org.hl7.fhir\build" -fileMask "*.xml" -find "%oldver%-SNAPSHOT" -replace "%newver%-SNAPSHOT" -count 0
|
||||
call "C:\tools\fnr.exe" -dir "C:\work\org.hl7.fhir\fhir-ig-publisher" -fileMask "*.xml" -find "%oldver%-SNAPSHOT" -replace "%newver%-SNAPSHOT" -count 0
|
||||
call "C:\tools\fnr.exe" -dir "C:\work\org.hl7.fhir\latest-ig-publisher" -fileMask "*.html" -find "%oldver%" -replace "%newver%" -count 0
|
||||
call "C:\tools\fnr.exe" -dir "C:\work\org.hl7.fhir\latest-ig-publisher" -fileMask "*.json" -find "%oldver%" -replace "%newver%" -count 0
|
||||
call mvn clean deploy -Dmaven.test.redirectTestOutputToFile=false -DdeployAtEnd=true
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
GOTO DONE
|
||||
|
Loading…
x
Reference in New Issue
Block a user