{"name": "document-reference-master-identifier-rewrites", "comment": "Notes whose masterIdentifier needs rewriting to be the identifier the C-CDA adapter writes for one ClinicalDocument/id: the NPI's OID as us-npi; a urn:uuid system in upper case, in lower case; a URN:OID: system in upper case, in lower case; a urn:oid: value of urn:ietf:rfc:3986 in upper case, in lower case; and kept as written: a urn:uuid value of a system other than urn:ietf:rfc:3986, and a system that is no absolute URI, a plain string; an empty value, which FHIR's schema refuses, writes none.", "input": {"file": "fixtures/in/document-reference-master-identifier-rewrites.json", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/in/document-reference-master-identifier-rewrites.json", "text": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"collection\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"http://example.org/fhir/DocumentReference/npi\",\n      \"resource\": {\n        \"resourceType\": \"DocumentReference\",\n        \"id\": \"npi\",\n        \"status\": \"current\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"18842-5\",\n              \"display\": \"Discharge summary\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"content\": [\n          {\n            \"attachment\": {\n              \"contentType\": \"application/pdf\",\n              \"url\": \"Binary/npi\"\n            },\n            \"format\": {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-HL7DocumentFormatCodes\",\n              \"code\": \"urn:hl7-org:sdwg:ccda-nonXMLBody:2.1\"\n            }\n          }\n        ],\n        \"masterIdentifier\": {\n          \"system\": \"urn:oid:2.16.840.1.113883.4.6\",\n          \"value\": \"1234567893\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"http://example.org/fhir/DocumentReference/uuid-system\",\n      \"resource\": {\n        \"resourceType\": \"DocumentReference\",\n        \"id\": \"uuid-system\",\n        \"status\": \"current\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"18842-5\",\n              \"display\": \"Discharge summary\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"content\": [\n          {\n            \"attachment\": {\n              \"contentType\": \"application/pdf\",\n              \"url\": \"Binary/uuid-system\"\n            },\n            \"format\": {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-HL7DocumentFormatCodes\",\n              \"code\": \"urn:hl7-org:sdwg:ccda-nonXMLBody:2.1\"\n            }\n          }\n        ],\n        \"masterIdentifier\": {\n          \"system\": \"urn:uuid:A1B2C3D4-E5F6-4711-8899-AABBCCDDEEFF\",\n          \"value\": \"E-2\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"http://example.org/fhir/DocumentReference/upper-oid-system\",\n      \"resource\": {\n        \"resourceType\": \"DocumentReference\",\n        \"id\": \"upper-oid-system\",\n        \"status\": \"current\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"18842-5\",\n              \"display\": \"Discharge summary\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"content\": [\n          {\n            \"attachment\": {\n              \"contentType\": \"application/pdf\",\n              \"url\": \"Binary/upper-oid-system\"\n            },\n            \"format\": {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-HL7DocumentFormatCodes\",\n              \"code\": \"urn:hl7-org:sdwg:ccda-nonXMLBody:2.1\"\n            }\n          }\n        ],\n        \"masterIdentifier\": {\n          \"system\": \"URN:OID:2.16.840.1.113883.19.5.99999.1\",\n          \"value\": \"E-1\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"http://example.org/fhir/DocumentReference/upper-oid-value\",\n      \"resource\": {\n        \"resourceType\": \"DocumentReference\",\n        \"id\": \"upper-oid-value\",\n        \"status\": \"current\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"18842-5\",\n              \"display\": \"Discharge summary\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"content\": [\n          {\n            \"attachment\": {\n              \"contentType\": \"application/pdf\",\n              \"url\": \"Binary/upper-oid-value\"\n            },\n            \"format\": {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-HL7DocumentFormatCodes\",\n              \"code\": \"urn:hl7-org:sdwg:ccda-nonXMLBody:2.1\"\n            }\n          }\n        ],\n        \"masterIdentifier\": {\n          \"system\": \"urn:ietf:rfc:3986\",\n          \"value\": \"URN:OID:2.16.840.1.113883.19.5.99999.1\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"http://example.org/fhir/DocumentReference/uuid-value-other-system\",\n      \"resource\": {\n        \"resourceType\": \"DocumentReference\",\n        \"id\": \"uuid-value-other-system\",\n        \"status\": \"current\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"18842-5\",\n              \"display\": \"Discharge summary\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"content\": [\n          {\n            \"attachment\": {\n              \"contentType\": \"application/pdf\",\n              \"url\": \"Binary/uuid-value-other-system\"\n            },\n            \"format\": {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-HL7DocumentFormatCodes\",\n              \"code\": \"urn:hl7-org:sdwg:ccda-nonXMLBody:2.1\"\n            }\n          }\n        ],\n        \"masterIdentifier\": {\n          \"system\": \"urn:oid:2.16.840.1.113883.19.5.99999.1\",\n          \"value\": \"urn:uuid:ABCDEF00-0000-4000-8000-000000000001\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"http://example.org/fhir/DocumentReference/relative-system\",\n      \"resource\": {\n        \"resourceType\": \"DocumentReference\",\n        \"id\": \"relative-system\",\n        \"status\": \"current\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"18842-5\",\n              \"display\": \"Discharge summary\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"content\": [\n          {\n            \"attachment\": {\n              \"contentType\": \"application/pdf\",\n              \"url\": \"Binary/relative-system\"\n            },\n            \"format\": {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-HL7DocumentFormatCodes\",\n              \"code\": \"urn:hl7-org:sdwg:ccda-nonXMLBody:2.1\"\n            }\n          }\n        ],\n        \"masterIdentifier\": {\n          \"system\": \"mysys\",\n          \"value\": \"E-3\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"http://example.org/fhir/DocumentReference/empty-value\",\n      \"resource\": {\n        \"resourceType\": \"DocumentReference\",\n        \"id\": \"empty-value\",\n        \"status\": \"current\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"18842-5\",\n              \"display\": \"Discharge summary\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/pat-1\"\n        },\n        \"content\": [\n          {\n            \"attachment\": {\n              \"contentType\": \"application/pdf\",\n              \"url\": \"Binary/empty-value\"\n            },\n            \"format\": {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-HL7DocumentFormatCodes\",\n              \"code\": \"urn:hl7-org:sdwg:ccda-nonXMLBody:2.1\"\n            }\n          }\n        ],\n        \"masterIdentifier\": {\n          \"system\": \"urn:oid:2.16.840.1.113883.19.5.99999.1\",\n          \"value\": \"\"\n        }\n      }\n    }\n  ]\n}\n"}, "expectedGraph": {"file": "fixtures/expected/document-reference-master-identifier-rewrites.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/expected/document-reference-master-identifier-rewrites.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;1LFeYHyv69wiR4XVnlX3REeM8fXwe7sVOVUMPRQi-tA> cascade:attachment <ni:///sha-256;1LFeYHyv69wiR4XVnlX3REeM8fXwe7sVOVUMPRQi-tA#attachment-1> .\n<ni:///sha-256;1LFeYHyv69wiR4XVnlX3REeM8fXwe7sVOVUMPRQi-tA#attachment-1> cascade:attachmentContentType \"application/pdf\" ;\n\tcascade:attachmentUrl \"Binary/npi\"^^xsd:anyURI .\n<ni:///sha-256;1LFeYHyv69wiR4XVnlX3REeM8fXwe7sVOVUMPRQi-tA> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:noteOrDocumentMasterIdentifier \"1234567893\"^^<http://hl7.org/fhir/sid/us-npi> ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> .\n<urn:uuid:10e420df-9699-82b0-8d80-9bb474a2a7f6> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/npi> ;\n\tcascade:sourceRecordId \"npi\" .\n<ni:///sha-256;1LFeYHyv69wiR4XVnlX3REeM8fXwe7sVOVUMPRQi-tA> prov:specializationOf <urn:uuid:10e420df-9699-82b0-8d80-9bb474a2a7f6> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:730ff597ef5556fac063a4d54eb166c1 bridge:arrivedAs <ni:///sha-256;1LFeYHyv69wiR4XVnlX3REeM8fXwe7sVOVUMPRQi-tA> ;\n\toa:hasSelector _:cf1c3e7d0eeaf88c3f00fe4d0f827ea2 ;\n\toa:hasSource <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasGeneratedBy _:6fb5fabdaca54b85626d1ab1b12e2923 .\n_:cf1c3e7d0eeaf88c3f00fe4d0f827ea2 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\n<ni:///sha-256;72ef7667rwuZkPPg4mKZ3kjsiipTHgzAkzENEhU2WF4> cascade:attachment <ni:///sha-256;72ef7667rwuZkPPg4mKZ3kjsiipTHgzAkzENEhU2WF4#attachment-1> .\n<ni:///sha-256;72ef7667rwuZkPPg4mKZ3kjsiipTHgzAkzENEhU2WF4#attachment-1> cascade:attachmentContentType \"application/pdf\" ;\n\tcascade:attachmentUrl \"Binary/uuid-system\"^^xsd:anyURI .\n<ni:///sha-256;72ef7667rwuZkPPg4mKZ3kjsiipTHgzAkzENEhU2WF4> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:noteOrDocumentMasterIdentifier \"E-2\"^^<urn:uuid:a1b2c3d4-e5f6-4711-8899-aabbccddeeff> ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> .\n<urn:uuid:d5f1cdf0-dd0b-8bd5-b94d-c3bf4df714f5> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/uuid-system> ;\n\tcascade:sourceRecordId \"uuid-system\" .\n<ni:///sha-256;72ef7667rwuZkPPg4mKZ3kjsiipTHgzAkzENEhU2WF4> prov:specializationOf <urn:uuid:d5f1cdf0-dd0b-8bd5-b94d-c3bf4df714f5> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:c7f5651d003ec908de91d515a1896184 bridge:arrivedAs <ni:///sha-256;72ef7667rwuZkPPg4mKZ3kjsiipTHgzAkzENEhU2WF4> ;\n\toa:hasSelector _:76bd9912fcfff74269d8a3bdbc15df8e ;\n\toa:hasSource <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasGeneratedBy _:6fb5fabdaca54b85626d1ab1b12e2923 .\n_:76bd9912fcfff74269d8a3bdbc15df8e a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n<ni:///sha-256;Bc_euK4y5hd7e-SxGk9bnPVs57p3IDNyT6neuO9BbrM> cascade:attachment <ni:///sha-256;Bc_euK4y5hd7e-SxGk9bnPVs57p3IDNyT6neuO9BbrM#attachment-1> .\n<ni:///sha-256;Bc_euK4y5hd7e-SxGk9bnPVs57p3IDNyT6neuO9BbrM#attachment-1> cascade:attachmentContentType \"application/pdf\" ;\n\tcascade:attachmentUrl \"Binary/upper-oid-system\"^^xsd:anyURI .\n<ni:///sha-256;Bc_euK4y5hd7e-SxGk9bnPVs57p3IDNyT6neuO9BbrM> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:noteOrDocumentMasterIdentifier \"E-1\"^^<urn:oid:2.16.840.1.113883.19.5.99999.1> ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> .\n<urn:uuid:4b0901a9-f23e-82b1-b1f7-e8ce58d5beb2> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/upper-oid-system> ;\n\tcascade:sourceRecordId \"upper-oid-system\" .\n<ni:///sha-256;Bc_euK4y5hd7e-SxGk9bnPVs57p3IDNyT6neuO9BbrM> prov:specializationOf <urn:uuid:4b0901a9-f23e-82b1-b1f7-e8ce58d5beb2> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:7def122bdbee9987b067f6be0f36e7ef bridge:arrivedAs <ni:///sha-256;Bc_euK4y5hd7e-SxGk9bnPVs57p3IDNyT6neuO9BbrM> ;\n\toa:hasSelector _:6790a59e0e0cdbf629f6e464cc9ae875 ;\n\toa:hasSource <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasGeneratedBy _:6fb5fabdaca54b85626d1ab1b12e2923 .\n_:6790a59e0e0cdbf629f6e464cc9ae875 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n<ni:///sha-256;X4YFXnyExFjpNyEZIigsjYWIImG8WLKAhFY0P5GC1-8> cascade:attachment <ni:///sha-256;X4YFXnyExFjpNyEZIigsjYWIImG8WLKAhFY0P5GC1-8#attachment-1> .\n<ni:///sha-256;X4YFXnyExFjpNyEZIigsjYWIImG8WLKAhFY0P5GC1-8#attachment-1> cascade:attachmentContentType \"application/pdf\" ;\n\tcascade:attachmentUrl \"Binary/upper-oid-value\"^^xsd:anyURI .\n<ni:///sha-256;X4YFXnyExFjpNyEZIigsjYWIImG8WLKAhFY0P5GC1-8> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:noteOrDocumentMasterIdentifier \"urn:oid:2.16.840.1.113883.19.5.99999.1\"^^<urn:ietf:rfc:3986> ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> .\n<urn:uuid:3c63514b-2a39-83cb-a866-7ba49d628164> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/upper-oid-value> ;\n\tcascade:sourceRecordId \"upper-oid-value\" .\n<ni:///sha-256;X4YFXnyExFjpNyEZIigsjYWIImG8WLKAhFY0P5GC1-8> prov:specializationOf <urn:uuid:3c63514b-2a39-83cb-a866-7ba49d628164> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:5da10b80018b66dc077d3d941787ab3f bridge:arrivedAs <ni:///sha-256;X4YFXnyExFjpNyEZIigsjYWIImG8WLKAhFY0P5GC1-8> ;\n\toa:hasSelector _:eacdbe79022b6beceb45156fa2072883 ;\n\toa:hasSource <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasGeneratedBy _:6fb5fabdaca54b85626d1ab1b12e2923 .\n_:eacdbe79022b6beceb45156fa2072883 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/3\" .\n<ni:///sha-256;DbnkTX_JlKagmuBOzf9fCzxpa03LXP2DXd25cmf4jV0> cascade:attachment <ni:///sha-256;DbnkTX_JlKagmuBOzf9fCzxpa03LXP2DXd25cmf4jV0#attachment-1> .\n<ni:///sha-256;DbnkTX_JlKagmuBOzf9fCzxpa03LXP2DXd25cmf4jV0#attachment-1> cascade:attachmentContentType \"application/pdf\" ;\n\tcascade:attachmentUrl \"Binary/uuid-value-other-system\"^^xsd:anyURI .\n<ni:///sha-256;DbnkTX_JlKagmuBOzf9fCzxpa03LXP2DXd25cmf4jV0> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:noteOrDocumentMasterIdentifier \"urn:uuid:ABCDEF00-0000-4000-8000-000000000001\"^^<urn:oid:2.16.840.1.113883.19.5.99999.1> ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> .\n<urn:uuid:e3081bf7-5cb1-8b96-b440-113a76071c78> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/uuid-value-other-system> ;\n\tcascade:sourceRecordId \"uuid-value-other-system\" .\n<ni:///sha-256;DbnkTX_JlKagmuBOzf9fCzxpa03LXP2DXd25cmf4jV0> prov:specializationOf <urn:uuid:e3081bf7-5cb1-8b96-b440-113a76071c78> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:c14e10aa384d3a7eeee8751a488821f1 bridge:arrivedAs <ni:///sha-256;DbnkTX_JlKagmuBOzf9fCzxpa03LXP2DXd25cmf4jV0> ;\n\toa:hasSelector _:33dc120c1df04145245ccec7b6c2ae08 ;\n\toa:hasSource <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasGeneratedBy _:6fb5fabdaca54b85626d1ab1b12e2923 .\n_:33dc120c1df04145245ccec7b6c2ae08 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/4\" .\n<ni:///sha-256;Jj2AVxF15NTAZDaKMz5XGo22480wpNpahSfIk0di3_U> cascade:attachment <ni:///sha-256;Jj2AVxF15NTAZDaKMz5XGo22480wpNpahSfIk0di3_U#attachment-1> .\n<ni:///sha-256;Jj2AVxF15NTAZDaKMz5XGo22480wpNpahSfIk0di3_U#attachment-1> cascade:attachmentContentType \"application/pdf\" ;\n\tcascade:attachmentUrl \"Binary/relative-system\"^^xsd:anyURI .\n<ni:///sha-256;Jj2AVxF15NTAZDaKMz5XGo22480wpNpahSfIk0di3_U> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:noteOrDocumentMasterIdentifier \"E-3\" ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> .\n<urn:uuid:60fb2af0-ab5d-8076-8d37-b475b3d2007d> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/relative-system> ;\n\tcascade:sourceRecordId \"relative-system\" .\n<ni:///sha-256;Jj2AVxF15NTAZDaKMz5XGo22480wpNpahSfIk0di3_U> prov:specializationOf <urn:uuid:60fb2af0-ab5d-8076-8d37-b475b3d2007d> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:6257ffe4ff6f7d416529efc5c9cc942f bridge:arrivedAs <ni:///sha-256;Jj2AVxF15NTAZDaKMz5XGo22480wpNpahSfIk0di3_U> ;\n\toa:hasSelector _:d30dc1c929923a40a34d63613469b5d9 ;\n\toa:hasSource <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasGeneratedBy _:6fb5fabdaca54b85626d1ab1b12e2923 .\n_:d30dc1c929923a40a34d63613469b5d9 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/5\" .\n<ni:///sha-256;H2x25YX_4tQDz2i1xNYxe3hIBGaGXXVfl2MY_mmUUIE> cascade:attachment <ni:///sha-256;H2x25YX_4tQDz2i1xNYxe3hIBGaGXXVfl2MY_mmUUIE#attachment-1> .\n<ni:///sha-256;H2x25YX_4tQDz2i1xNYxe3hIBGaGXXVfl2MY_mmUUIE#attachment-1> cascade:attachmentContentType \"application/pdf\" ;\n\tcascade:attachmentUrl \"Binary/empty-value\"^^xsd:anyURI .\n<ni:///sha-256;H2x25YX_4tQDz2i1xNYxe3hIBGaGXXVfl2MY_mmUUIE> cascade:noteOrDocumentTypeName \"Discharge summary\" ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/18842-5> .\n<urn:uuid:08c401ef-943e-84c2-b0f0-c7d1bfba3d97> a cascade:ClinicalNoteOrDocument ;\n\tcascade:sourceUrl <http://example.org/fhir/DocumentReference/empty-value> ;\n\tcascade:sourceRecordId \"empty-value\" .\n<ni:///sha-256;H2x25YX_4tQDz2i1xNYxe3hIBGaGXXVfl2MY_mmUUIE> prov:specializationOf <urn:uuid:08c401ef-943e-84c2-b0f0-c7d1bfba3d97> ;\n\tcascade:patient <urn:uuid:1cc3cbf1-3a8f-8691-923b-e87de6e5c3a3> .\n_:b5c276cda955dad7304cca07c7166507 bridge:arrivedAs <ni:///sha-256;H2x25YX_4tQDz2i1xNYxe3hIBGaGXXVfl2MY_mmUUIE> ;\n\toa:hasSelector _:29dc3a45dbe363ab151a711cbed18e45 ;\n\toa:hasSource <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasDerivedFrom <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:wasGeneratedBy _:6fb5fabdaca54b85626d1ab1b12e2923 .\n_:29dc3a45dbe363ab151a711cbed18e45 a oa:FragmentSelector ;\n\tdct:conformsTo <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/6\" .\n<ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> cascade:serverBaseUrl \"http://example.org/fhir\" ;\n\tpav:retrievedOn \"2026-10-13T09:00:00Z\"^^xsd:dateTime ;\n\tcascade:sourceFormatVersion \"4.0.1\" .\n_:6fb5fabdaca54b85626d1ab1b12e2923 <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;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> a prov:Entity .\n_:6fb5fabdaca54b85626d1ab1b12e2923 a prov:Activity ;\n\tprov:used <ni:///sha-256;zYfBXEEpkZVOqBDZL1kRh7ocf3NuPBI2Upf31XnoMDE> ;\n\tprov:qualifiedAssociation _:f947afe4af01b46ac021d8b458736a1d .\n_:f947afe4af01b46ac021d8b458736a1d prov:hadPlan _:4cbcaf2758c241f867161b1553843710 .\n_:4cbcaf2758c241f867161b1553843710 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"fhir-r4\" ;\n\tpav:version \"0.1.0\" .\n_:f947afe4af01b46ac021d8b458736a1d prov:agent _:789eaa6713b494bb91d8eb6173ead4f6 .\n_:789eaa6713b494bb91d8eb6173ead4f6 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-master-identifier-rewrites.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-fhir-r4/blob/15621eef1b6e4578c254871490838e45939a8487/fixtures/findings/document-reference-master-identifier-rewrites.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_:be89459af978b21c3269e145cf4eecf8 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/0\" .\n_:ed373e398d4a98be3e0785c3603e5749 oa:hasSource <../in/document-reference-master-identifier-rewrites.json> .\n_:be89459af978b21c3269e145cf4eecf8 oa:refinedBy _:d71c84719788aad46592943436ef2517 .\n_:d71c84719788aad46592943436ef2517 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/content/0/attachment/url\" .\n_:ed373e398d4a98be3e0785c3603e5749 oa:hasSelector _:be89459af978b21c3269e145cf4eecf8 .\n_:c21ee1fce91c94a05c69ae398ba53d07 oa:hasTarget _:ed373e398d4a98be3e0785c3603e5749 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n_:df155e0fa2c1a837a85322b7eafc765f a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/1\" .\n_:a468a3d089cb71f16e834507f52dc729 oa:hasSource <../in/document-reference-master-identifier-rewrites.json> .\n_:df155e0fa2c1a837a85322b7eafc765f oa:refinedBy _:b85bec7c4b6e1840e9343bdcccc7368c .\n_:b85bec7c4b6e1840e9343bdcccc7368c a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/content/0/attachment/url\" .\n_:a468a3d089cb71f16e834507f52dc729 oa:hasSelector _:df155e0fa2c1a837a85322b7eafc765f .\n_:a823deca6e4a0dcb75b5b32a78e7ce99 oa:hasTarget _:a468a3d089cb71f16e834507f52dc729 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n_:a9caef8d3d08deab654bea1b8be19edb a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/2\" .\n_:a04f4f4dc3729b87d4e88cc098c76e78 oa:hasSource <../in/document-reference-master-identifier-rewrites.json> .\n_:a9caef8d3d08deab654bea1b8be19edb oa:refinedBy _:a1367e7acd93b38314c9af73ec6b06df .\n_:a1367e7acd93b38314c9af73ec6b06df a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/content/0/attachment/url\" .\n_:a04f4f4dc3729b87d4e88cc098c76e78 oa:hasSelector _:a9caef8d3d08deab654bea1b8be19edb .\n_:b06d2c5a2771b454dc6095f40087e94a oa:hasTarget _:a04f4f4dc3729b87d4e88cc098c76e78 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n_:de5f1c8e0c5e9ff02a163a75932288ce a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/3\" .\n_:eb97535c5af66ddf13031005551eeec8 oa:hasSource <../in/document-reference-master-identifier-rewrites.json> .\n_:de5f1c8e0c5e9ff02a163a75932288ce oa:refinedBy _:e256b89d4d52661fb2dadf6a1865910b .\n_:e256b89d4d52661fb2dadf6a1865910b a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/content/0/attachment/url\" .\n_:eb97535c5af66ddf13031005551eeec8 oa:hasSelector _:de5f1c8e0c5e9ff02a163a75932288ce .\n_:afd836692d0c5aa72a1d40eadf77f044 oa:hasTarget _:eb97535c5af66ddf13031005551eeec8 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n_:f5b8ee0e85a0152a4adcf431e4dffc44 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/4\" .\n_:ece6922c77678f0acc11bcf799fc2b4e oa:hasSource <../in/document-reference-master-identifier-rewrites.json> .\n_:f5b8ee0e85a0152a4adcf431e4dffc44 oa:refinedBy _:e41701c70bbdc306f028eba9eb330c28 .\n_:e41701c70bbdc306f028eba9eb330c28 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/content/0/attachment/url\" .\n_:ece6922c77678f0acc11bcf799fc2b4e oa:hasSelector _:f5b8ee0e85a0152a4adcf431e4dffc44 .\n_:f5de6955e9dfa4ea96c03ada20d8a94 oa:hasTarget _:ece6922c77678f0acc11bcf799fc2b4e ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n_:e7991f12bfc84383aa1d7c528ae47965 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/5\" .\n_:a082aa33756ba2eb323e6534ee4ee698 oa:hasSource <../in/document-reference-master-identifier-rewrites.json> .\n_:e7991f12bfc84383aa1d7c528ae47965 oa:refinedBy _:fc1d8f1287742caba69dc36925ac6d5c .\n_:fc1d8f1287742caba69dc36925ac6d5c a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/content/0/attachment/url\" .\n_:a082aa33756ba2eb323e6534ee4ee698 oa:hasSelector _:e7991f12bfc84383aa1d7c528ae47965 .\n_:bcbf46a5f9988111152998ab6c224a9b oa:hasTarget _:a082aa33756ba2eb323e6534ee4ee698 ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n_:a706cd0d800cb99e182350f1a7f62092 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/6\" .\n_:c963d3372345c21409d999fde2184326 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource\" .\n_:a706cd0d800cb99e182350f1a7f62092 oa:refinedBy _:c963d3372345c21409d999fde2184326 .\n_:ea99f06b041d06ee242951ff2177671b a oa:Annotation ;\n\toa:hasTarget _:b9d8089edac48d74dd6ef6c789b64452 .\n_:b9d8089edac48d74dd6ef6c789b64452 oa:hasSource <../in/document-reference-master-identifier-rewrites.json> ;\n\toa:hasSelector _:a706cd0d800cb99e182350f1a7f62092 .\n_:ea99f06b041d06ee242951ff2177671b 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_:fb1b2ad241204b7d46ad77d30d68c250 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/entry/6\" .\n_:c615818f43c9c5b9d28cfd895b9956ab oa:hasSource <../in/document-reference-master-identifier-rewrites.json> .\n_:fb1b2ad241204b7d46ad77d30d68c250 oa:refinedBy _:a9c7d9feb0ca33232a9c14fdd673ea21 .\n_:a9c7d9feb0ca33232a9c14fdd673ea21 a oa:FragmentSelector ;\n\t<http://purl.org/dc/terms/conformsTo> <https://www.rfc-editor.org/rfc/rfc6901> ;\n\trdf:value \"/resource/content/0/attachment/url\" .\n_:c615818f43c9c5b9d28cfd895b9956ab oa:hasSelector _:fb1b2ad241204b7d46ad77d30d68c250 .\n_:e246ce318fa6fae40eca0b3eeaf32b0e oa:hasTarget _:c615818f43c9c5b9d28cfd895b9956ab ;\n\tsh:resultSeverity sh:Warning ;\n\ta oa:Annotation ;\n\toa:hasBody fhirr4:attachmentDataNotRead ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"application/pdf\" .\n", "empty": false}}