{"name": "document-reference-text-attachments", "comment": "A DocumentReference with four inline text contents: XML, which is not read and is reported; text/plain of white space only, passed over; text/plain holding < and >, kept as written as its text; and a second text/plain, reported as not carried.", "input": {"file": "fixtures/in/document-reference-text-attachments.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/document-reference-text-attachments.json", "text": "{\n  \"resourceType\": \"DocumentReference\",\n  \"id\": \"text-attachments\",\n  \"status\": \"current\",\n  \"type\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"11506-3\",\n        \"display\": \"Progress note\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"reference\": \"Patient/pat-1\"\n  },\n  \"content\": [\n    {\n      \"attachment\": {\n        \"contentType\": \"text/xml\",\n        \"data\": \"PD94bWwgdmVyc2lvbj0iMS4wIj8+PENsaW5pY2FsRG9jdW1lbnQgeG1sbnM9InVybjpobDctb3JnOnYzIi8+\"\n      }\n    },\n    {\n      \"attachment\": {\n        \"contentType\": \"text/plain\",\n        \"data\": \"ICAgCiAg\"\n      }\n    },\n    {\n      \"attachment\": {\n        \"contentType\": \"text/plain\",\n        \"data\": \"QjEyIDwgMjAwIHBnL21MOyBmb2xhdGUgPiA0IG5nL21M\"\n      }\n    },\n    {\n      \"attachment\": {\n        \"contentType\": \"text/plain\",\n        \"data\": \"QSBzZWNvbmQgcmVuZGl0aW9u\"\n      }\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/document-reference-text-attachments.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/document-reference-text-attachments.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;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA> cascade:attachment <ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-4> .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-4> cascade:attachmentContentType \"text/plain\" .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA> cascade:attachment <ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-3> .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-3> cascade:attachmentContentType \"text/plain\" .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA> cascade:attachment <ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-2> .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-2> cascade:attachmentContentType \"text/plain\" .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA> cascade:attachment <ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-1> .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA#attachment-1> cascade:attachmentContentType \"text/xml\" .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA> cascade:narrativeText \"B12 < 200 pg/mL; folate > 4 ng/mL\" ;\n\tcascade:noteOrDocumentTypeName \"Progress note\" ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/11506-3> .\n<urn:uuid:ae16d757-36b2-8b1e-91b9-c78900718741> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/text-attachments> ;\n\tcascade:sourceRecordId \"text-attachments\" .\n<ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA> prov:specializationOf <urn:uuid:ae16d757-36b2-8b1e-91b9-c78900718741> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:d380bc09afab79eca487771a41f018d2 bridge:arrivedAs <ni:///sha-256;XAHP89Z8TpLXmcAFD1t-cVYsMCKEcDN0_inTRfcqBcA> ;\n\toa:hasSelector _:4fdb339d8e628d9f99e02fba3ec8a967 ;\n\toa:hasSource <ni:///sha-256;RWdg9yW1ZFg93aGcU-kgCKrYtyIdIU6XKLobS-xz7OQ> ;\n\tprov:wasDerivedFrom <ni:///sha-256;RWdg9yW1ZFg93aGcU-kgCKrYtyIdIU6XKLobS-xz7OQ> ;\n\tprov:wasGeneratedBy _:80385c48bb8c0b73cbf7438cc974f0b6 .\n_:4fdb339d8e628d9f99e02fba3ec8a967 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n<ni:///sha-256;RWdg9yW1ZFg93aGcU-kgCKrYtyIdIU6XKLobS-xz7OQ> cascade:serverBaseUrl \"http://example.org/fhir\" ;\n\tpav:retrievedOn \"2026-10-13T09:00:00Z\"^^xsd:dateTime ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:80385c48bb8c0b73cbf7438cc974f0b6 <http://www.w3.org/2000/01/rdf-schema#label> \"Example server export\" ;\n\tprov:startedAtTime \"2026-10-13T09:00:04Z\"^^xsd:dateTime .\n<ni:///sha-256;RWdg9yW1ZFg93aGcU-kgCKrYtyIdIU6XKLobS-xz7OQ> a prov:Entity .\n_:80385c48bb8c0b73cbf7438cc974f0b6 a prov:Activity ;\n\tprov:used <ni:///sha-256;RWdg9yW1ZFg93aGcU-kgCKrYtyIdIU6XKLobS-xz7OQ> ;\n\tprov:qualifiedAssociation _:24897b297e6d67391c2ef8859ed71fd4 .\n_:24897b297e6d67391c2ef8859ed71fd4 prov:hadPlan _:262ebf04ea4320b25e7b618fc50cc6e3 .\n_:262ebf04ea4320b25e7b618fc50cc6e3 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:24897b297e6d67391c2ef8859ed71fd4 prov:agent _:ebb90c2a2d61e868f41ef68ac9280076 .\n_:ebb90c2a2d61e868f41ef68ac9280076 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/document-reference-text-attachments.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/document-reference-text-attachments.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_:d353929b9ce47eb2d879e7bc63f67367 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:bf9f9647183860f2b6838333a416dbbb oa:hasSource <../in/document-reference-text-attachments.json> .\n_:d353929b9ce47eb2d879e7bc63f67367 oa:refinedBy _:e01397c275512cc259867da4e8a8d6a4 .\n_:e01397c275512cc259867da4e8a8d6a4 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/content/0/attachment/data\" .\n_:bf9f9647183860f2b6838333a416dbbb oa:hasSelector _:d353929b9ce47eb2d879e7bc63f67367 .\n_:d11e691ded004c282f0f92a53798518f oa:hasTarget _:bf9f9647183860f2b6838333a416dbbb .\n_:addfb345dcdc87234c06c3e1f1cc8b27 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"\" .\n_:e9a0246204d30a2cb0acde34968a4e0d oa:hasSource <../in/document-reference-text-attachments.json> .\n_:addfb345dcdc87234c06c3e1f1cc8b27 oa:refinedBy _:db754562baf8c24645e2c7d6fa5f3f2 .\n_:db754562baf8c24645e2c7d6fa5f3f2 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/content/3/attachment/data\" .\n_:e9a0246204d30a2cb0acde34968a4e0d oa:hasSelector _:addfb345dcdc87234c06c3e1f1cc8b27 .\n_:b15ddb3cea9de2747e564d28f5e678d2 oa:hasTarget _:e9a0246204d30a2cb0acde34968a4e0d .\n_:d11e691ded004c282f0f92a53798518f sh:resultSeverity sh:Warning .\n_:b15ddb3cea9de2747e564d28f5e678d2 sh:resultSeverity sh:Info .\n_:d11e691ded004c282f0f92a53798518f a oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"text/xml\" .\n_:b15ddb3cea9de2747e564d28f5e678d2 a oa:Annotation ;\n\toa:hasBody fhirr4:textAttachmentNotCarried ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"text/plain\" .\n", "empty": false}}