{"name": "condition-category-text-beside-a-coding-and-alone", "comment": "A Condition with two categories, one a coding with text beside it and one text alone: only the text alone is reported, since text beside a coding is that coding's label.", "input": {"file": "fixtures/in/condition-category-text-beside-a-coding-and-alone.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/condition-category-text-beside-a-coding-and-alone.json", "text": "{\n  \"resourceType\": \"Condition\",\n  \"id\": \"cond-category-text-1\",\n  \"clinicalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n        \"code\": \"active\"\n      }\n    ]\n  },\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\n          \"code\": \"problem-list-item\"\n        }\n      ],\n      \"text\": \"Problem\"\n    },\n    {\n      \"text\": \"Chronic disease management\"\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"44054006\",\n        \"display\": \"Type 2 diabetes mellitus\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"reference\": \"Patient/pat-conformance-1\"\n  }\n}\n"}, "expectedGraph": {"file": "fixtures/expected/condition-category-text-beside-a-coding-and-alone.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/condition-category-text-beside-a-coding-and-alone.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;yp3dEZIJj-a5bPmJYbETNAaJA-gRBn2BAAKQNdWSb8E> cascade:conditionName \"Type 2 diabetes mellitus\" ;\n\tcascade:conditionCode <http://snomed.info/id/44054006> ;\n\tcascade:clinicalStatus \"active\" ;\n\tcascade:conditionCategory \"problem-list-item\" .\n<urn:uuid:822ebdda-1244-825a-bb6f-703e94f7a118> a cascade:ProblemOrDiagnosis ;\n\tcascade:sourceUrl <https://fhir.meridian.example/api/FHIR/R4/Condition/cond-category-text-1> ;\n\tcascade:sourceRecordId \"cond-category-text-1\" .\n<ni:///sha-256;yp3dEZIJj-a5bPmJYbETNAaJA-gRBn2BAAKQNdWSb8E> prov:specializationOf <urn:uuid:822ebdda-1244-825a-bb6f-703e94f7a118> ;\n\tcascade:patient <urn:uuid:7883c5a4-6c61-837c-9bf7-dbe1b37d89ff> .\n_:b81758c442d83af444b1eb6ce5833d97 bridge:arrivedAs <ni:///sha-256;yp3dEZIJj-a5bPmJYbETNAaJA-gRBn2BAAKQNdWSb8E> ;\n\toa:hasSelector _:8c9cef1342c0e7aacbee7fadf8ff6f9b ;\n\toa:hasSource <ni:///sha-256;uy_5oilKYxOwtQ4QJFJVaMi_rPhTAG0Y0SIUrLpc4z8> ;\n\tprov:wasDerivedFrom <ni:///sha-256;uy_5oilKYxOwtQ4QJFJVaMi_rPhTAG0Y0SIUrLpc4z8> ;\n\tprov:wasGeneratedBy _:3e809042fb3e9707b55970eccd9b74ed .\n_:8c9cef1342c0e7aacbee7fadf8ff6f9b a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;uy_5oilKYxOwtQ4QJFJVaMi_rPhTAG0Y0SIUrLpc4z8> cascade:serverBaseUrl \"https://fhir.meridian.example/api/FHIR/R4\" ;\n\tpav:retrievedOn \"2026-09-01T10:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:d6903f677d3e6c9188add76ea70209e5 ;\n\tprov:wasAttributedTo _:2654e130bc98d79d8b5e641689fdd01c ;\n\tcascade:authenticatedPatient \"Patient/eM5vN8qTz2Hc4Rk7Jw0Pb3\" ;\n\tcascade:authenticatedAsProxy false ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:a00d6a0439e579a912e76d2b9039f694 prov:agent _:2654e130bc98d79d8b5e641689fdd01c ;\n\tprov:hadRole cascade:AuthorRole .\n_:d6903f677d3e6c9188add76ea70209e5 prov:qualifiedAssociation _:a00d6a0439e579a912e76d2b9039f694 .\n_:15ba2c4f74a14fc166c535f3e7149008 prov:agent _:9656b348fecac82f3caf27aabc7cb267 ;\n\tprov:hadRole cascade:TransmitterRole .\n_:d6903f677d3e6c9188add76ea70209e5 prov:qualifiedAssociation _:15ba2c4f74a14fc166c535f3e7149008 .\n_:2654e130bc98d79d8b5e641689fdd01c <http://www.w3.org/2000/01/rdf-schema#label> \"Meridian Health System\" .\n_:9656b348fecac82f3caf27aabc7cb267 <http://www.w3.org/2000/01/rdf-schema#label> \"Apple Health\" .\n_:3e809042fb3e9707b55970eccd9b74ed <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;uy_5oilKYxOwtQ4QJFJVaMi_rPhTAG0Y0SIUrLpc4z8> a prov:Entity .\n_:3e809042fb3e9707b55970eccd9b74ed a prov:Activity ;\n\tprov:used <ni:///sha-256;uy_5oilKYxOwtQ4QJFJVaMi_rPhTAG0Y0SIUrLpc4z8> ;\n\tprov:qualifiedAssociation _:5264952778fc26cd7c6ef04a2029150e .\n_:5264952778fc26cd7c6ef04a2029150e prov:hadPlan _:4d87201e37b7b9a9d633d6e1fd8ac687 .\n_:4d87201e37b7b9a9d633d6e1fd8ac687 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:5264952778fc26cd7c6ef04a2029150e prov:agent _:684304b53055f21b8ee7bad04a6db29c .\n_:684304b53055f21b8ee7bad04a6db29c 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/condition-category-text-beside-a-coding-and-alone.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/condition-category-text-beside-a-coding-and-alone.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_:db009e0b2755cce3ae279eb965264a6d a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:eb8b3eeb044f7282c109fb44b5f779f6 oa:hasSource <../in/condition-category-text-beside-a-coding-and-alone.json> .\n_:db009e0b2755cce3ae279eb965264a6d oa:refinedBy _:e1da43ac6b161a8ce358ad6037126f48 .\n_:e1da43ac6b161a8ce358ad6037126f48 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/category/1/text\" .\n_:eb8b3eeb044f7282c109fb44b5f779f6 oa:hasSelector _:db009e0b2755cce3ae279eb965264a6d .\n_:d6ab42879635e29a1f37744e36e1ad3b oa:hasTarget _:eb8b3eeb044f7282c109fb44b5f779f6 ;\n\tsh:resultSeverity sh:Info ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:categoryTextNotCarried ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"Chronic disease management\" .\n", "empty": false}}