{"name": "lab-potassium-approximate", "comment": "A laboratory Observation whose value carries the comparator ~, outside FHIR R4's four: no number is typed, the value is text, ~4.1, its unit the unit's text, and the refused comparator is a finding.", "input": {"file": "fixtures/in/lab-potassium-approximate.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/lab-potassium-approximate.json", "text": "{\n  \"resourceType\": \"Observation\",\n  \"id\": \"obs-potassium-approximate-1\",\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"2823-3\",\n        \"display\": \"Potassium [Moles/volume] in Serum or Plasma\"\n      }\n    ],\n    \"text\": \"Potassium\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/pat-conformance-1\"\n  },\n  \"effectiveDateTime\": \"2026-08-04T08:15:00Z\",\n  \"valueQuantity\": {\n    \"value\": 4.1,\n    \"comparator\": \"~\",\n    \"unit\": \"mmol/L\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"mmol/L\"\n  }\n}\n"}, "expectedGraph": {"file": "fixtures/expected/lab-potassium-approximate.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/lab-potassium-approximate.ttl", "text": "@prefix bridge: <https://ns.cascadeprotocol.org/bridge/v1-draft#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix cascade: <https://ns.cascadeprotocol.org/cascade#> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n@prefix prov: <http://www.w3.org/ns/prov#> .\n@prefix dct: <http://purl.org/dc/terms/> .\n@prefix dcterms: <http://purl.org/dc/terms/> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n@prefix pav: <http://purl.org/pav/> .\n<ni:///sha-256;78QV8w5NtWClMu6eaiXGkj8jqrTpnyeKLx1mKRrtqCU> cascade:testCode <http://loinc.org/rdf/2823-3> ;\n\tcascade:testName \"Potassium\" ;\n\tcascade:resultValueKind cascade:TextResultValue ;\n\tcascade:resultValueText \"~4.1\" ;\n\tcascade:resultUnitText \"mmol/L\" ;\n\tcascade:resultClinicallyRelevantTime \"2026-08-04T08:15:00Z\"^^xsd:dateTime ;\n\tcascade:workflowStatus \"final\" .\n<urn:uuid:48e4b93e-9ec7-8de2-8b49-ee7b8f70507d> a cascade:LaboratoryTestResult ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/Observation/obs-potassium-approximate-1> ;\n\tcascade:sourceRecordId \"obs-potassium-approximate-1\" .\n<ni:///sha-256;78QV8w5NtWClMu6eaiXGkj8jqrTpnyeKLx1mKRrtqCU> prov:specializationOf <urn:uuid:48e4b93e-9ec7-8de2-8b49-ee7b8f70507d> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:4c974fa3a24471740f224baf7b303db5 bridge:arrivedAs <ni:///sha-256;78QV8w5NtWClMu6eaiXGkj8jqrTpnyeKLx1mKRrtqCU> ;\n\toa:hasSelector _:ae39d9ac618bef4b75f8cd2065079e57 ;\n\toa:hasSource <ni:///sha-256;DHG4SZt2bj7_lQXOaFQFqjRCypm40YRMCBtIXBSW7Zg> ;\n\tprov:wasDerivedFrom <ni:///sha-256;DHG4SZt2bj7_lQXOaFQFqjRCypm40YRMCBtIXBSW7Zg> ;\n\tprov:wasGeneratedBy _:e6767a18e3e2e965d1b903a5d98019ef .\n_:ae39d9ac618bef4b75f8cd2065079e57 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;DHG4SZt2bj7_lQXOaFQFqjRCypm40YRMCBtIXBSW7Zg> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:26bb49682ad214f4eb1a4725caaf91cc ;\n\tprov:wasAttributedTo _:91ab88b94446e01c901b7c939fa0b731 ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:4adb85c5252e2363e1b60fe56c694bf5 prov:agent _:91ab88b94446e01c901b7c939fa0b731 ;\n\tprov:hadRole cascade:AuthorRole .\n_:26bb49682ad214f4eb1a4725caaf91cc prov:qualifiedAssociation _:4adb85c5252e2363e1b60fe56c694bf5 .\n_:b3fc6cc2529b8d4cda6cd18cb9029ac3 prov:agent _:5188dc94095a5f92ae0bf886e391792b ;\n\tprov:hadRole cascade:TransmitterRole .\n_:26bb49682ad214f4eb1a4725caaf91cc prov:qualifiedAssociation _:b3fc6cc2529b8d4cda6cd18cb9029ac3 .\n_:91ab88b94446e01c901b7c939fa0b731 <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:5188dc94095a5f92ae0bf886e391792b <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:e6767a18e3e2e965d1b903a5d98019ef <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health export\" ;\n\tprov:startedAtTime \"2026-09-01T10:00:04Z\"^^xsd:dateTime .\n<ni:///sha-256;DHG4SZt2bj7_lQXOaFQFqjRCypm40YRMCBtIXBSW7Zg> a prov:Entity .\n_:e6767a18e3e2e965d1b903a5d98019ef a prov:Activity ;\n\tprov:used <ni:///sha-256;DHG4SZt2bj7_lQXOaFQFqjRCypm40YRMCBtIXBSW7Zg> ;\n\tprov:qualifiedAssociation _:50aa37699a4f505d2d54e9f665e76769 .\n_:50aa37699a4f505d2d54e9f665e76769 prov:hadPlan _:a85bbf8f589985fcc335481b041aa228 .\n_:a85bbf8f589985fcc335481b041aa228 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:50aa37699a4f505d2d54e9f665e76769 prov:agent _:e0965a0f7cb96329b89dd28fd168c24b .\n_:e0965a0f7cb96329b89dd28fd168c24b a prov:SoftwareAgent ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"Cascade Bridge for Rust\" ;\n\tpav:version \"0.1.0\" .\n"}, "expectedFindings": {"file": "fixtures/findings/lab-potassium-approximate.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/lab-potassium-approximate.ttl", "text": "@prefix fhirr4: <https://ns.cascadeprotocol.org/adapter/fhir-r4/v1-draft#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix sh: <http://www.w3.org/ns/shacl#> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n_:a895e489153786283699e6e5c748a15 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:db48dea571d397680e680fd9f0c006fc a oa:Annotation ;\n\toa:hasTarget _:e7c7a7adef42a49471f60ac5054e0370 .\n_:e7c7a7adef42a49471f60ac5054e0370 oa:hasSource <../in/lab-potassium-approximate.json> ;\n\toa:hasSelector _:a895e489153786283699e6e5c748a15 .\n_:db48dea571d397680e680fd9f0c006fc oa:hasBody <https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01#section-6.28> ;\n\toa:motivatedBy oa:classifying ;\n\tsh:resultSeverity sh:Violation .\n_:e5f55eb5eaf62b2e36e67b2fad82e231 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:f89ff8be20f5c5bb7dd7062b403dbbf4 oa:hasSource <../in/lab-potassium-approximate.json> .\n_:e5f55eb5eaf62b2e36e67b2fad82e231 oa:refinedBy _:c461bed670c86c251b8fb1ff6a3eacf0 .\n_:c461bed670c86c251b8fb1ff6a3eacf0 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/valueQuantity/comparator\" .\n_:f89ff8be20f5c5bb7dd7062b403dbbf4 oa:hasSelector _:e5f55eb5eaf62b2e36e67b2fad82e231 .\n_:b7d3d53694f6dd6b4d337507ae712e70 oa:hasTarget _:f89ff8be20f5c5bb7dd7062b403dbbf4 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:labResultNumberRefused ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"~\" .\n", "empty": false}}