Merge pull request #1073 from hapifhir/gg-202301-urn-validation
Gg 202301 urn validation
This commit is contained in:
commit
bbad7717f7
|
@ -2275,6 +2275,9 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
|
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
|
||||||
|
if (logger.isDebugLogging()) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.print(":");
|
System.out.print(":");
|
||||||
|
|
|
@ -207,7 +207,7 @@ public class ContextUtilities implements ProfileKnowledgeProvider {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (!isSuppressDebugMessages()) {
|
if (!isSuppressDebugMessages()) {
|
||||||
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
|
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
|
||||||
if (true) {
|
if (context.getLogger().isDebugLogging()) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -660,6 +660,9 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// not sure what to do in this case?
|
// not sure what to do in this case?
|
||||||
System.out.println("Unable to generate snapshot for "+uri+": "+e.getMessage());
|
System.out.println("Unable to generate snapshot for "+uri+": "+e.getMessage());
|
||||||
|
if (logger.isDebugLogging()) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
|
|
@ -57,7 +57,6 @@ public class FTPClient {
|
||||||
else {
|
else {
|
||||||
clientImpl.connect(server);
|
clientImpl.connect(server);
|
||||||
}
|
}
|
||||||
//clientImpl.setFileTransferMode(FTP.BINARY_FILE_TYPE);
|
|
||||||
|
|
||||||
clientImpl.login(user, password);
|
clientImpl.login(user, password);
|
||||||
|
|
||||||
|
@ -93,6 +92,7 @@ public class FTPClient {
|
||||||
String resolvedPath = resolveRemotePath(path);
|
String resolvedPath = resolveRemotePath(path);
|
||||||
FileInputStream localStream = new FileInputStream(source);
|
FileInputStream localStream = new FileInputStream(source);
|
||||||
clientImpl.setFileType(FTP.BINARY_FILE_TYPE);
|
clientImpl.setFileType(FTP.BINARY_FILE_TYPE);
|
||||||
|
clientImpl.enterLocalPassiveMode();
|
||||||
clientImpl.storeFile( resolvedPath, localStream);
|
clientImpl.storeFile( resolvedPath, localStream);
|
||||||
localStream.close();
|
localStream.close();
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,7 @@ Type_Specific_Checks_DT_URI_UUID = URI values cannot start with uuid:
|
||||||
Type_Specific_Checks_DT_URI_WS = URI values cannot have whitespace(''{0}'')
|
Type_Specific_Checks_DT_URI_WS = URI values cannot have whitespace(''{0}'')
|
||||||
Type_Specific_Checks_DT_URL_Resolve = URL value ''{0}'' does not resolve
|
Type_Specific_Checks_DT_URL_Resolve = URL value ''{0}'' does not resolve
|
||||||
Type_Specific_Checks_DT_UUID_Strat = UUIDs must start with urn:uuid:
|
Type_Specific_Checks_DT_UUID_Strat = UUIDs must start with urn:uuid:
|
||||||
Type_Specific_Checks_DT_UUID_Valid = UUIDs must be valid (and lowercase)
|
Type_Specific_Checks_DT_UUID_Valid = UUIDs must be valid and lowercase ({0})
|
||||||
Validation_BUNDLE_Message = The first entry in a message must be a MessageHeader
|
Validation_BUNDLE_Message = The first entry in a message must be a MessageHeader
|
||||||
Validation_VAL_Content_Unknown = Unrecognised Content {0}
|
Validation_VAL_Content_Unknown = Unrecognised Content {0}
|
||||||
Validation_VAL_NoType = Unknown type {0}
|
Validation_VAL_NoType = Unknown type {0}
|
||||||
|
|
|
@ -764,9 +764,9 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
|
||||||
makeSnapshot(sd);
|
makeSnapshot(sd);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Process Note: Unable to generate snapshot for " + sd.present() + ": " + e.getMessage());
|
System.out.println("Process Note: Unable to generate snapshot for " + sd.present() + ": " + e.getMessage());
|
||||||
// if (debug) {
|
if (context.getLogger().isDebugLogging()) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2319,7 +2319,11 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url != null && url.startsWith("urn:uuid:")) {
|
if (url != null && url.startsWith("urn:uuid:")) {
|
||||||
ok = rule(errors, NO_RULE_DATE, IssueType.INVALID, e.line(), e.col(), path, Utilities.isValidUUID(url.substring(9)), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_UUID_VALID) && ok;
|
String s = url.substring(9);
|
||||||
|
if (s.contains("#")) {
|
||||||
|
s = s.substring(0, s.indexOf("#"));
|
||||||
|
}
|
||||||
|
ok = rule(errors, NO_RULE_DATE, IssueType.INVALID, e.line(), e.col(), path, Utilities.isValidUUID(s), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_UUID_VALID, s) && ok;
|
||||||
}
|
}
|
||||||
if (url != null && url.startsWith("urn:oid:")) {
|
if (url != null && url.startsWith("urn:oid:")) {
|
||||||
String cc = url.substring(8);
|
String cc = url.substring(8);
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://standardterms.edqm.eu",
|
||||||
|
"code" : "20049000",
|
||||||
|
"display" : "Nasal use"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Nasal use",
|
||||||
|
"code" : "20049000",
|
||||||
|
"system" : "http://standardterms.edqm.eu"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
|
@ -49,3 +49,14 @@ v: {
|
||||||
"system" : "urn:iso:std:iso:3166"
|
"system" : "urn:iso:std:iso:3166"
|
||||||
}
|
}
|
||||||
-------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "urn:iso:std:iso:3166",
|
||||||
|
"code" : "NO",
|
||||||
|
"display" : "Norway"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Norway",
|
||||||
|
"code" : "NO",
|
||||||
|
"system" : "urn:iso:std:iso:3166"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -2184,3 +2184,67 @@ v: {
|
||||||
"system" : "http://loinc.org"
|
"system" : "http://loinc.org"
|
||||||
}
|
}
|
||||||
-------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://loinc.org",
|
||||||
|
"code" : "60591-5"
|
||||||
|
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Patient summary Document",
|
||||||
|
"code" : "60591-5",
|
||||||
|
"system" : "http://loinc.org"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://loinc.org",
|
||||||
|
"code" : "60591-5",
|
||||||
|
"display" : "Patient Summary Document"
|
||||||
|
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Patient summary Document",
|
||||||
|
"code" : "60591-5",
|
||||||
|
"system" : "http://loinc.org"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://loinc.org",
|
||||||
|
"code" : "60591-5"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Patient summary Document",
|
||||||
|
"code" : "60591-5",
|
||||||
|
"system" : "http://loinc.org"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://loinc.org",
|
||||||
|
"code" : "48765-2",
|
||||||
|
"display" : "Allergies and adverse reactions Document"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Allergies and adverse reactions Document",
|
||||||
|
"code" : "48765-2",
|
||||||
|
"system" : "http://loinc.org"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://loinc.org",
|
||||||
|
"code" : "10160-0",
|
||||||
|
"display" : "History of Medication use Narrative"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "History of Medication use Narrative",
|
||||||
|
"code" : "10160-0",
|
||||||
|
"system" : "http://loinc.org"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://loinc.org",
|
||||||
|
"code" : "11450-4",
|
||||||
|
"display" : "Problem list - Reported"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "Problem list - Reported",
|
||||||
|
"code" : "11450-4",
|
||||||
|
"system" : "http://loinc.org"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -110,3 +110,14 @@ v: {
|
||||||
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm"
|
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm"
|
||||||
}
|
}
|
||||||
-------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------
|
||||||
|
{"code" : {
|
||||||
|
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm",
|
||||||
|
"code" : "1000990",
|
||||||
|
"display" : "oxymetazoline hydrochloride 0.5 MG/ML Nasal Spray"
|
||||||
|
}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
|
||||||
|
v: {
|
||||||
|
"display" : "oxymetazoline hydrochloride 0.5 MG/ML Nasal Spray",
|
||||||
|
"code" : "1000990",
|
||||||
|
"system" : "http://www.nlm.nih.gov/research/umls/rxnorm"
|
||||||
|
}
|
||||||
|
-------------------------------------------------------------------------------------
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<hapi_fhir_version>6.2.1</hapi_fhir_version>
|
<hapi_fhir_version>6.2.1</hapi_fhir_version>
|
||||||
<validator_test_case_version>1.2.7</validator_test_case_version>
|
<validator_test_case_version>1.2.8-SNAPSHOT</validator_test_case_version>
|
||||||
<junit_jupiter_version>5.7.1</junit_jupiter_version>
|
<junit_jupiter_version>5.7.1</junit_jupiter_version>
|
||||||
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>
|
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>
|
||||||
<maven_surefire_version>3.0.0-M5</maven_surefire_version>
|
<maven_surefire_version>3.0.0-M5</maven_surefire_version>
|
||||||
|
|
Loading…
Reference in New Issue