{"name": "medication-name-in-material", "comment": "A prescribed medication whose manufactured material has an RxNorm code and a name, and no display name or original text: the material's name is the drug's name and no source path is left unaccounted.", "input": {"file": "fixtures/in/medication-name-in-material.xml", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/in/medication-name-in-material.xml", "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ClinicalDocument xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n  <realmCode code=\"US\"/>\n  <typeId root=\"2.16.840.1.113883.1.3\" extension=\"POCD_HD000040\"/>\n  <templateId root=\"2.16.840.1.113883.10.20.22.1.1\" extension=\"2015-08-01\"/>\n  <templateId root=\"2.16.840.1.113883.10.20.22.1.2\" extension=\"2015-08-01\"/>\n  <id root=\"2.16.840.1.113883.19.5.99999.1\" extension=\"CCD-2026-1104-D\"/>\n  <code code=\"34133-9\" displayName=\"Summarization of Episode Note\" codeSystem=\"2.16.840.1.113883.6.1\" codeSystemName=\"LOINC\"/>\n  <title>Continuity of Care Document</title>\n  <effectiveTime value=\"20261104090000-0500\"/>\n  <confidentialityCode code=\"N\" codeSystem=\"2.16.840.1.113883.5.25\"/>\n  <languageCode code=\"en-US\"/>\n  <recordTarget>\n    <patientRole>\n      <id root=\"2.16.840.1.113883.19.5.99999.2\" extension=\"MRN-448120\"/>\n      <patient>\n        <name use=\"L\">\n          <given>Robin</given>\n          <family>Ahmadi</family>\n        </name>\n        <administrativeGenderCode code=\"F\" codeSystem=\"2.16.840.1.113883.5.1\"/>\n        <birthTime value=\"19780214\"/>\n      </patient>\n    </patientRole>\n  </recordTarget>\n  <author>\n    <time value=\"20261104090000-0500\"/>\n    <assignedAuthor>\n      <id root=\"2.16.840.1.113883.19.5.99999.3\"/>\n      <representedOrganization>\n        <name>Riverside Community Hospital</name>\n      </representedOrganization>\n    </assignedAuthor>\n  </author>\n  <custodian>\n    <assignedCustodian>\n      <representedCustodianOrganization>\n        <id root=\"2.16.840.1.113883.19.5.99999.3\"/>\n        <name>Riverside Community Hospital</name>\n      </representedCustodianOrganization>\n    </assignedCustodian>\n  </custodian>\n  <component>\n    <structuredBody>\n      <component>\n        <section>\n          <templateId root=\"2.16.840.1.113883.10.20.22.2.1.1\" extension=\"2014-06-09\"/>\n          <code code=\"10160-0\" displayName=\"History of Medication use Narrative\" codeSystem=\"2.16.840.1.113883.6.1\" codeSystemName=\"LOINC\"/>\n          <title>Medications</title>\n          <text>amlodipine 5 mg tablet</text>\n          <entry typeCode=\"DRIV\">\n            <substanceAdministration classCode=\"SBADM\" moodCode=\"INT\">\n              <templateId root=\"2.16.840.1.113883.10.20.22.4.16\" extension=\"2014-06-09\"/>\n              <id root=\"2.16.840.1.113883.19.5.99999.5\" extension=\"MED-5501\"/>\n              <statusCode code=\"active\"/>\n              <effectiveTime xsi:type=\"IVL_TS\">\n                <low value=\"20261101\"/>\n              </effectiveTime>\n              <consumable>\n                <manufacturedProduct classCode=\"MANU\">\n                  <templateId root=\"2.16.840.1.113883.10.20.22.4.23\" extension=\"2014-06-09\"/>\n                  <manufacturedMaterial>\n                    <code code=\"197361\" codeSystem=\"2.16.840.1.113883.6.88\" codeSystemName=\"RxNorm\"/>\n                    <name>amlodipine 5 MG Oral Tablet</name>\n                  </manufacturedMaterial>\n                </manufacturedProduct>\n              </consumable>\n            </substanceAdministration>\n          </entry>\n        </section>\n      </component>\n    </structuredBody>\n  </component>\n</ClinicalDocument>\n"}, "expectedGraph": {"file": "fixtures/expected/medication-name-in-material.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/expected/medication-name-in-material.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 foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix prov: <http://www.w3.org/ns/prov#> .\n@prefix org: <http://www.w3.org/ns/org#> .\n@prefix oa: <http://www.w3.org/ns/oa#> .\n<urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> a cascade:Organization .\n<ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> prov:wasGeneratedBy _:a308d442bc529396c1b1e5a9e67443b ;\n\tprov:wasAttributedTo <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:a308d442bc529396c1b1e5a9e67443b prov:qualifiedAssociation _:fda110fa3fb6c973d22b2ade35aac8e0 .\n_:fda110fa3fb6c973d22b2ade35aac8e0 prov:agent <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> ;\n\tprov:hadRole cascade:CustodianRole .\n<ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> prov:specializationOf <urn:uuid:5769da63-d46b-8c66-b381-d00b2f7ccadb> .\n_:bc44a0e9d7506d2c1eb066adb9d845cc bridge:arrivedAs <ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> ;\n\toa:hasSelector _:b02b8a8c9ad13b81be37a196fbca938a .\n_:b02b8a8c9ad13b81be37a196fbca938a a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='custodian' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='assignedCustodian' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='representedCustodianOrganization' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n<ni:///sha-256;grKi0ms_W2WGoIJBSajj9WqQqFYdSHTIaehKWGv5yRg> foaf:name \"Riverside Community Hospital\" ;\n\torg:identifier \"urn:oid:2.16.840.1.113883.19.5.99999.3\"^^<urn:ietf:rfc:3986> .\n<ni:///sha-256;3kQgtpNkeCCUIkqxFhj8jaCCQ9hIdJ2_Xw3GBjsE3bY> cascade:prescribedOrReported \"prescribed\" ;\n\tcascade:medicationUseStartDate \"2026-11-01\"^^xsd:date ;\n\tcascade:drugName \"amlodipine 5 MG Oral Tablet\" ;\n\tcascade:workflowStatus \"active\" ;\n\tcascade:rxNormCode <https://ns.cascadeprotocol.org/codes/rxnorm/197361> .\n<ni:///sha-256;XxVCjM7yYQfOlzxxafZnmtQD9egLi-JrV9F3SckXTTU> cascade:noteOrDocumentTypeName \"History of Medication use Narrative\" ;\n\tcascade:workflowStatus \"current\" ;\n\tcascade:noteOrDocumentTitle \"Medications\" ;\n\tcascade:noteOrDocumentDate \"2026-11-04T09:00:00-05:00\"^^xsd:dateTime ;\n\tcascade:noteOrDocumentTypeCode <http://loinc.org/rdf/10160-0> ;\n\tcascade:narrativeText \"amlodipine 5 mg tablet\" .\n<ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> foaf:familyName \"Ahmadi\" ;\n\tfoaf:givenName \"Robin\" ;\n\tcascade:dateOfBirth \"1978-02-14\"^^xsd:date ;\n\tcascade:administrativeGender \"female\" .\n<urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> a cascade:PatientProfile ;\n\tcascade:sourceUrl <urn:hl7ii:2.16.840.1.113883.19.5.99999.2:MRN-448120> ;\n\tcascade:sourceRecordId \"2.16.840.1.113883.19.5.99999.2:MRN-448120\" .\n<ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> prov:specializationOf <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:dd22de2ff559aba33f464f0d879f4662 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='recordTarget' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='patientRole' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:870ae1e3f12ee963b96375fd49f9d071 bridge:arrivedAs <ni:///sha-256;8OhFhApPXbNaEpnniPsDDmUOh7GZ3tQ3brvo1CVgP0c> ;\n\toa:hasSelector _:dd22de2ff559aba33f464f0d879f4662 .\n<urn:uuid:c3777c89-013d-8cdc-9c0c-a3423065822a> a cascade:PrescribedOrReportedMedication ;\n\tcascade:sourceUrl <urn:hl7ii:2.16.840.1.113883.19.5.99999.5:MED-5501> ;\n\tcascade:sourceRecordId \"2.16.840.1.113883.19.5.99999.5:MED-5501\" .\n<ni:///sha-256;3kQgtpNkeCCUIkqxFhj8jaCCQ9hIdJ2_Xw3GBjsE3bY> prov:specializationOf <urn:uuid:c3777c89-013d-8cdc-9c0c-a3423065822a> ;\n\tcascade:patient <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:c23c1ead0fa9652124b60c13851f4129 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='structuredBody' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='section' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='entry' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='substanceAdministration' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:7db7efd8923ef573957a88f20c821077 bridge:arrivedAs <ni:///sha-256;3kQgtpNkeCCUIkqxFhj8jaCCQ9hIdJ2_Xw3GBjsE3bY> ;\n\toa:hasSelector _:c23c1ead0fa9652124b60c13851f4129 .\n<urn:uuid:30f40b00-02a0-89e3-8882-40e26ed365f3> a cascade:ClinicalNoteOrDocument .\n<ni:///sha-256;XxVCjM7yYQfOlzxxafZnmtQD9egLi-JrV9F3SckXTTU> prov:specializationOf <urn:uuid:30f40b00-02a0-89e3-8882-40e26ed365f3> ;\n\tcascade:patient <urn:uuid:ed62f5a3-7994-8c3c-9b4a-9f1f41a1aba4> .\n_:e9ac3806f1955bcd5a3740f703b92a8c a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='structuredBody' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='component' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-name()='section' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:99d51c1014fe024524cb9e54dbb779c4 bridge:arrivedAs <ni:///sha-256;XxVCjM7yYQfOlzxxafZnmtQD9egLi-JrV9F3SckXTTU> ;\n\toa:hasSelector _:e9ac3806f1955bcd5a3740f703b92a8c ;\n\toa:hasSource <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasDerivedFrom <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasGeneratedBy _:f3b0838f2d0ae5e42c952626be88a1f2 .\n_:bc44a0e9d7506d2c1eb066adb9d845cc oa:hasSource <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasDerivedFrom <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasGeneratedBy _:f3b0838f2d0ae5e42c952626be88a1f2 .\n_:7db7efd8923ef573957a88f20c821077 oa:hasSource <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasDerivedFrom <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasGeneratedBy _:f3b0838f2d0ae5e42c952626be88a1f2 .\n_:870ae1e3f12ee963b96375fd49f9d071 oa:hasSource <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasDerivedFrom <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:wasGeneratedBy _:f3b0838f2d0ae5e42c952626be88a1f2 .\n<ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> <http://purl.org/pav/retrievedOn> \"2025-07-02T09:00:00Z\"^^xsd:dateTime ;\n\tprov:wasGeneratedBy _:2f16cbf134767c32aa7ffb13f6156169 .\n_:90a5dcd55d4298ed09a5a2fa8947b59e prov:agent _:7672fb0e71824920069866d0833136ae ;\n\tprov:hadRole cascade:TransmitterRole .\n_:2f16cbf134767c32aa7ffb13f6156169 prov:qualifiedAssociation _:90a5dcd55d4298ed09a5a2fa8947b59e .\n_:7672fb0e71824920069866d0833136ae <http://www.w3.org/2000/01/rdf-schema#label> \"Riverside patient portal\" .\n_:f3b0838f2d0ae5e42c952626be88a1f2 <http://www.w3.org/2000/01/rdf-schema#label> \"C-CDA download\" ;\n\tprov:startedAtTime \"2025-07-02T09:00:04Z\"^^xsd:dateTime .\n<ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> a prov:Entity .\n_:f3b0838f2d0ae5e42c952626be88a1f2 a prov:Activity ;\n\tprov:used <ni:///sha-256;uS1j18HNeZG0rOvKVHyhpBc0OCqBNgS55qVLTfeIV7o> ;\n\tprov:qualifiedAssociation _:a7893acd881b3d77d1e05cb53aefd121 .\n_:a7893acd881b3d77d1e05cb53aefd121 prov:hadPlan _:274d0a0a15b573f562e521bbe778d125 .\n_:274d0a0a15b573f562e521bbe778d125 a prov:Plan ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"ccda\" ;\n\t<http://purl.org/pav/version> \"0.1.0\" .\n_:a7893acd881b3d77d1e05cb53aefd121 prov:agent _:3aef639e889c3065ab28a1067f1c963a .\n_:3aef639e889c3065ab28a1067f1c963a a prov:SoftwareAgent ;\n\t<http://www.w3.org/2000/01/rdf-schema#label> \"Cascade Bridge for Rust\" ;\n\t<http://purl.org/pav/version> \"0.1.0\" .\n"}, "expectedFindings": {"file": "fixtures/findings/medication-name-in-material.ttl", "link": "https://github.com/the-cascade-protocol/cascade-bridge-adapter-ccda/blob/0c6ffe52b3c3d2dcd0dfaf3f0b9e00b69bf2ba96/fixtures/findings/medication-name-in-material.ttl", "text": "@prefix ccda: <https://ns.cascadeprotocol.org/adapter/ccda/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_:ea2c8450f277da91545ab1fa9d11bc49 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:c36fc4b093b42d326cc03569758722c a oa:XPathSelector ;\n\trdf:value \"*[local-name()='author' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:ea2c8450f277da91545ab1fa9d11bc49 oa:refinedBy _:c36fc4b093b42d326cc03569758722c .\n_:f16ba384b6eb7507bb658ca3352f7686 a oa:Annotation ;\n\toa:hasTarget _:d45dbc562575a07a810e73ca923797ca .\n_:d45dbc562575a07a810e73ca923797ca oa:hasSource <../in/medication-name-in-material.xml> ;\n\toa:hasSelector _:ea2c8450f277da91545ab1fa9d11bc49 .\n_:f16ba384b6eb7507bb658ca3352f7686 oa:hasBody ccda:documentAuthor ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']/*[local-name()='author' and namespace-uri()='urn:hl7-org:v3']\" ;\n\tsh:resultSeverity sh:Info .\n_:f981b5a15c467823834531103f45dc53 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:fa08ea89bce113277cce3ffb56418468 oa:hasSource <../in/medication-name-in-material.xml> .\n_:f981b5a15c467823834531103f45dc53 oa:refinedBy _:b8d1e3fae8454b692f5ec8ef0dcb6459 .\n_:b8d1e3fae8454b692f5ec8ef0dcb6459 a oa:XPathSelector ;\n\trdf:value \"*[local-name()='id' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:fa08ea89bce113277cce3ffb56418468 oa:hasSelector _:f981b5a15c467823834531103f45dc53 .\n_:f8faecaefa46ef0fe44303eba4634234 oa:hasTarget _:fa08ea89bce113277cce3ffb56418468 .\n_:bb55fcd2d0181ae35d8decfddf5c6fc4 a oa:XPathSelector ;\n\trdf:value \"/*[local-name()='ClinicalDocument' and namespace-uri()='urn:hl7-org:v3']\" .\n_:ffd90822ea85747edc2f23f9fb7dffa1 oa:hasSource <../in/medication-name-in-material.xml> .\n_:bb55fcd2d0181ae35d8decfddf5c6fc4 oa:refinedBy _:b9a6f7f7f045dcacb714add1ff384fac .\n_:b9a6f7f7f045dcacb714add1ff384fac a oa:XPathSelector ;\n\trdf:value \"*[local-name()='code' and namespace-uri()='urn:hl7-org:v3'][1]\" .\n_:ffd90822ea85747edc2f23f9fb7dffa1 oa:hasSelector _:bb55fcd2d0181ae35d8decfddf5c6fc4 .\n_:b31927bb74ca82c57038adcc3537036d oa:hasTarget _:ffd90822ea85747edc2f23f9fb7dffa1 .\n_:f8faecaefa46ef0fe44303eba4634234 sh:resultSeverity sh:Info .\n_:b31927bb74ca82c57038adcc3537036d sh:resultSeverity sh:Info .\n_:f8faecaefa46ef0fe44303eba4634234 a oa:Annotation ;\n\toa:hasBody ccda:documentId ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"2.16.840.1.113883.19.5.99999.1|CCD-2026-1104-D\" .\n_:b31927bb74ca82c57038adcc3537036d a oa:Annotation ;\n\toa:hasBody ccda:documentType ;\n\toa:motivatedBy oa:classifying ;\n\tsh:value \"34133-9\" .\n", "empty": false}}