{"name": "lab-every-mapped-element", "comment": "A lab result carrying every element in/sparql/lab-result.rq reads: a value written with a trailing zero, a unit, a reference range, an interpretation and a time with an offset.", "input": {"file": "fixtures/in/lab-every-mapped-element.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/lab-every-mapped-element.json", "text": "{\n  \"resourceType\": \"Observation\",\n  \"id\": \"obs-hba1c-1\",\n  \"meta\": {\n    \"versionId\": \"1\",\n    \"lastUpdated\": \"2026-04-14T16:20:00Z\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\",\n          \"display\": \"Laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"4548-4\",\n        \"display\": \"Hemoglobin A1c/Hemoglobin.total in Blood\"\n      }\n    ],\n    \"text\": \"Hemoglobin A1c\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/pat-conformance-1\"\n  },\n  \"effectiveDateTime\": \"2026-04-14T08:05:00-04:00\",\n  \"issued\": \"2026-04-14T16:20:00Z\",\n  \"valueQuantity\": {\n    \"value\": 6.80,\n    \"unit\": \"%\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"%\"\n  },\n  \"interpretation\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n          \"code\": \"H\",\n          \"display\": \"High\"\n        }\n      ]\n    }\n  ],\n  \"referenceRange\": [\n    {\n      \"low\": {\n        \"value\": 4.0,\n        \"unit\": \"%\",\n        \"system\": \"http://unitsofmeasure.org\",\n        \"code\": \"%\"\n      },\n      \"high\": {\n        \"value\": 5.6,\n        \"unit\": \"%\",\n        \"system\": \"http://unitsofmeasure.org\",\n        \"code\": \"%\"\n      }\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/lab-every-mapped-element.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/lab-every-mapped-element.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;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk> cascade:testCode <http://loinc.org/rdf/4548-4> ;\n\tcascade:resultInterpretationCode <https://ns.cascadeprotocol.org/codes/observationinterpretation/H> ;\n\tcascade:resultQuantity <ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk#value> .\n<ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk#value> cascade:decimalValue 6.8 ;\n\tcascade:writtenValue \"6.80\" ;\n\tcascade:ucumUnit \"%\" ;\n\tcascade:unitText \"%\" .\n<ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk> cascade:referenceRangeHigh <ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk#reference-high> .\n<ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk#reference-high> cascade:decimalValue 5.6 ;\n\tcascade:writtenValue \"5.6\" ;\n\tcascade:ucumUnit \"%\" ;\n\tcascade:unitText \"%\" .\n<ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk> cascade:referenceRangeLow <ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk#reference-low> .\n<ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk#reference-low> cascade:decimalValue \"4\"^^xsd:decimal ;\n\tcascade:writtenValue \"4.0\" ;\n\tcascade:ucumUnit \"%\" ;\n\tcascade:unitText \"%\" .\n<ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk> cascade:testName \"Hemoglobin A1c\" ;\n\tcascade:resultValueKind cascade:QuantityResultValue ;\n\tcascade:referenceRangeText \"4.0-5.6 %\" ;\n\tcascade:resultClinicallyRelevantTime \"2026-04-14T08:05:00-04:00\"^^xsd:dateTime ;\n\tcascade:workflowStatus \"final\" .\n<urn:uuid:9181429b-6975-8fe8-a541-14e29ada1965> a cascade:LaboratoryTestResult ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/Observation/obs-hba1c-1> ;\n\tcascade:sourceRecordId \"obs-hba1c-1\" .\n<ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk> prov:specializationOf <urn:uuid:9181429b-6975-8fe8-a541-14e29ada1965> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:af603887e140b6229819c87ae60b2ef3 bridge:arrivedAs <ni:///sha-256;oLFmK29D5I_lNJWNUKHgWVJJC5CCV_2QP1yAGC06uNk> ;\n\tpav:version \"1\" ;\n\tpav:lastUpdateOn \"2026-04-14T16:20:00Z\"^^xsd:dateTime ;\n\toa:hasSelector _:20578315f092e4168ac09ef42d9c062 ;\n\toa:hasSource <ni:///sha-256;9W07ztb_zb6361553k2dQl3ZQM6J7X9sNyPy-QOJsfI> ;\n\tprov:wasDerivedFrom <ni:///sha-256;9W07ztb_zb6361553k2dQl3ZQM6J7X9sNyPy-QOJsfI> ;\n\tprov:wasGeneratedBy _:a57634f8513c6e24062fbc3d1da12794 .\n_:20578315f092e4168ac09ef42d9c062 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;9W07ztb_zb6361553k2dQl3ZQM6J7X9sNyPy-QOJsfI> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedFrom <https://FHIR.Meridian.example/api/FHIR/R4/Observation/obs-hba1c-1> ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:dcb9bd23313d61928f59b98a56d9b457 ;\n\tprov:wasAttributedTo _:10abdffe45712696c860c1f22e52c462 ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:1b4d5a65111e4257cbb35373e4052cb6 prov:agent _:10abdffe45712696c860c1f22e52c462 ;\n\tprov:hadRole cascade:AuthorRole .\n_:dcb9bd23313d61928f59b98a56d9b457 prov:qualifiedAssociation _:1b4d5a65111e4257cbb35373e4052cb6 .\n_:eae68b7f1f39c275f13d91ee201b96a9 prov:agent _:b3f0c7a16795670831aeadea71505060 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:dcb9bd23313d61928f59b98a56d9b457 prov:qualifiedAssociation _:eae68b7f1f39c275f13d91ee201b96a9 .\n_:10abdffe45712696c860c1f22e52c462 <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:b3f0c7a16795670831aeadea71505060 <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:a57634f8513c6e24062fbc3d1da12794 <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;9W07ztb_zb6361553k2dQl3ZQM6J7X9sNyPy-QOJsfI> a prov:Entity .\n_:a57634f8513c6e24062fbc3d1da12794 a prov:Activity ;\n\tprov:used <ni:///sha-256;9W07ztb_zb6361553k2dQl3ZQM6J7X9sNyPy-QOJsfI> ;\n\tprov:qualifiedAssociation _:9259d90b75ab3059a930cb8ec33ae5fb .\n_:9259d90b75ab3059a930cb8ec33ae5fb prov:hadPlan _:6cbdc76706f43b6415a456de3297100c .\n_:6cbdc76706f43b6415a456de3297100c a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:9259d90b75ab3059a930cb8ec33ae5fb prov:agent _:a84f78fcbdb76920342f9a9986182a27 .\n_:a84f78fcbdb76920342f9a9986182a27 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-every-mapped-element.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/lab-every-mapped-element.ttl", "text": "", "empty": true}}