onc-healthit / onc-certification-g10-test-kit

ONC Certification (g)(10) Standardized API Tests
Apache License 2.0
32 stars 10 forks source link

Example URLs are not allowed in this context Error for identifier field #437

Closed Nbhatin closed 10 months ago

Nbhatin commented 1 year ago

Hi, I am running ONC g(10) test suite with uscore 3.1 version.

Noticed that inferno is giving an error when using identifier.system as "http://acme.com/ids/patients/risks" Tried the same url using acme.con for other resources and got the same error. Same error when tried with https://inferno.healthit.gov/validator

However , if I replace acme with something else, it works.

Error: AllergyIntolerance.identifier[0].system: Example URLs are not allowed in this context (http://acme.com/ids/patients/risks) on line 14.

Resource json: { "resourceType": "AllergyIntolerance", "id": "A115118", "meta": { "versionId": "1", "lastUpdated": "2023-06-01T18:35:24.602+00:00" }, "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">

Generated Narrative

<div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource "example"

identifier: id: 49476534

clinicalStatus: Active <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"codesystem-allergyintolerance-clinical.html\">AllergyIntolerance Clinical Status Codes#active)

verificationStatus: Confirmed <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"codesystem-allergyintolerance-verification.html\">AllergyIntolerance Verification Status Codes#confirmed)

type: allergy

category: food

criticality: high

code: Cashew nuts <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT#227493005)

patient: <a href=\"patient-example.html\">Patient/example "Peter CHALMERS"

onset: 2004

recordedDate: 2014-10-09T14:58:00+11:00

recorder: <a href=\"practitioner-example.html\">Practitioner/example "Adam CAREFUL"

asserter: <a href=\"patient-example.html\">Patient/example "Peter CHALMERS"

lastOccurrence: 2012-06

note: The criticality is high becasue of the observed anaphylactic reaction when challenged with cashew extract.

reaction

substance: cashew nut allergenic extract Injectable Product <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/3.1.0/CodeSystem-v3-rxNorm.html\">RxNorm#1160593)

manifestation: Anaphylactic reaction <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT#39579001)

description: Challenge Protocol. Severe reaction to subcutaneous cashew extract. Epinephrine administered

onset: 2012-06-12

severity: severe

exposureRoute: Subcutaneous route <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT#34206005)

reaction

manifestation: Urticaria <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT#64305001)

onset: 2004

severity: moderate

note: The patient reports that the onset of urticaria was within 15 minutes of eating cashews.

" }, "identifier": [ { "system": "http://acme.com/ids/patients/risks", "value": "49476534" } ], "clinicalStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", "code": "active", "display": "Active" } ] }, "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", "code": "confirmed", "display": "Confirmed" } ] }, "type": "allergy", "category": [ "food" ], "criticality": "high", "code": { "coding": [ { "system": "http://snomed.info/sct", "code": "762952008", "display": "Peanut" } ] }, "patient": { "reference": "Patient/A78238" }, "onsetDateTime": "2004", "recordedDate": "2014-10-09T14:58:00+11:00", "lastOccurrence": "2012-06", "note": [ { "text": "The criticality is high becasue of the observed anaphylactic reaction when challenged with cashew extract." } ] }

yunwwang commented 1 year ago

Very interesting. This is coming from FHIR validator:

          } else if (url.contains("example.org") || url.contains("acme.com")) {
            ok = rule(errors, NO_RULE_DATE, IssueType.INVALID, e.line(), e.col(), path, false, I18nConstants.TYPE_SPECIFIC_CHECKS_DT_URL_EXAMPLE, url) && ok;;

https://github.com/hapifhir/org.hl7.fhir.core/blob/60fe0fd0f89f5a163fff4fd1373c3f55574da2cc/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java#LL2691C16-L2691C16

I don't know why it singles out "acme.com".

You can raise an issue to that github repo.

I aslo post a zulip question: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Why.20is.20acme.2Eorg.20considered.20as.20example.20.3F

update: there is very interesting discussion about acme in that zulip thread!