mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-26 07:15:13 +00:00
Improve URN validation
This commit is contained in:
parent
a61d860ddb
commit
4b1a3dba46
@ -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_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_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_VAL_Content_Unknown = Unrecognised Content {0}
|
||||
Validation_VAL_NoType = Unknown type {0}
|
||||
|
@ -2319,7 +2319,11 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||
}
|
||||
|
||||
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:")) {
|
||||
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"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"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"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"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"
|
||||
}
|
||||
-------------------------------------------------------------------------------------
|
||||
{"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>
|
||||
<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_platform_launcher_version>1.8.2</junit_platform_launcher_version>
|
||||
<maven_surefire_version>3.0.0-M5</maven_surefire_version>
|
||||
|
Loading…
x
Reference in New Issue
Block a user