@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:Library;
  fhir:Resource.id [ fhir:value "OpioidCDSCommonConfig"], [ fhir:value "options"];
  fhir:DomainResource.extension [
     fhir:index 0;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions" ];
     fhir:Extension.value [
       fhir:Reference.reference [ fhir:value "#options" ]
     ]
  ], [
     fhir:index 1;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem" ];
     fhir:Extension.value [
       fhir:Reference.reference [ fhir:value "Device/cqf-tooling" ]
     ]
  ];
  fhir:Library.url [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig"];
  fhir:Library.version [ fhir:value "2022.1.0"];
  fhir:Library.name [ fhir:value "OpioidCDSCommonConfig"];
  fhir:Library.title [ fhir:value "Library - OpioidCDS Common Configuration"];
  fhir:Library.status [ fhir:value "active"];
  fhir:Library.experimental [ fhir:value "true"];
  fhir:Library.type [
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/library-type" ];
       fhir:Coding.code [ fhir:value "logic-library" ]
     ]
  ];
  fhir:Library.date [ fhir:value "2025-12-31T04:14:52+00:00"];
  fhir:Library.publisher [ fhir:value "Centers for Disease Control and Prevention (CDC)"];
  fhir:Library.contact [
     fhir:index 0;
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "https://www.cdc.gov" ]
     ]
  ];
  fhir:Library.jurisdiction [
     fhir:index 0;
     fhir:CodeableConcept.coding [ fhir:index 0 ]
  ];
  fhir:Library.parameter [
     fhir:index 0;
     fhir:ParameterDefinition.name [ fhir:value "Age Less than 18 Years Is Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 1;
     fhir:ParameterDefinition.name [ fhir:value "End-Stage Disease Criteria Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 2;
     fhir:ParameterDefinition.name [ fhir:value "Sickle Cell Check Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 3;
     fhir:ParameterDefinition.name [ fhir:value "Sickle Cell Assumed Active" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 4;
     fhir:ParameterDefinition.name [ fhir:value "Active Cancer Treatment Encounters Condition Is Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 5;
     fhir:ParameterDefinition.name [ fhir:value "Opioid Naive Prescription Condition Is Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 6;
     fhir:ParameterDefinition.name [ fhir:value "Opioid Naive Report Condition Is Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 7;
     fhir:ParameterDefinition.name [ fhir:value "Opioid Naive Dispense Condition Is Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 8;
     fhir:ParameterDefinition.name [ fhir:value "Hospice Findings Exclusion Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 9;
     fhir:ParameterDefinition.name [ fhir:value "Can the implementing EHR support queries for past medications by date range?" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 10;
     fhir:ParameterDefinition.name [ fhir:value "Opioid Treatment Plan Verification Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 11;
     fhir:ParameterDefinition.name [ fhir:value "Opioid Harms & Risks Discussion in Past 90 Days Criteria Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 12;
     fhir:ParameterDefinition.name [ fhir:value "Order is to Treat Acute Pain Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 13;
     fhir:ParameterDefinition.name [ fhir:value "Evidence of Naloxone Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 14;
     fhir:ParameterDefinition.name [ fhir:value "PDMP Data Not Reviewed in Past 90 Days Criteria Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 15;
     fhir:ParameterDefinition.name [ fhir:value "Opiate Urine Screening Check Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 16;
     fhir:ParameterDefinition.name [ fhir:value "Cannabinoid Urine Screening Check Enabled" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 17;
     fhir:ParameterDefinition.name [ fhir:value "Use Alternative UDS Lookback Period" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ], [
     fhir:index 18;
     fhir:ParameterDefinition.name [ fhir:value "Alternative UDS Lookback Period" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "Period" ]
  ], [
     fhir:index 19;
     fhir:ParameterDefinition.name [ fhir:value "Evidence Based Treatment Criteria For Opioid Use Disorder" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "boolean" ]
  ];
  fhir:Library.content [
     fhir:index 0;
     fhir:Attachment.contentType [ fhir:value "text/cql" ];
     fhir:Attachment.data [ fhir:value "bGlicmFyeSBPcGlvaWRDRFNDb21tb25Db25maWcgdmVyc2lvbiAnMjAyMi4xLjAnCgovLyBDREMgMjAyMiBHZW5lcmFsIEluY2x1c2lvbiBDcml0ZXJpYQpkZWZpbmUgIkFnZSBMZXNzIHRoYW4gMTggWWVhcnMgSXMgRW5hYmxlZCI6CiAgdHJ1ZQoKLy8gQ0RDIDIwMjIgR2VuZXJhbCBJbmNsdXNpb24gQ3JpdGVyaWEKZGVmaW5lICJFbmQtU3RhZ2UgRGlzZWFzZSBDcml0ZXJpYSBFbmFibGVkIjoKICB0cnVlCgovLyBTaWNrbGUgQ2VsbApkZWZpbmUgIlNpY2tsZSBDZWxsIENoZWNrIEVuYWJsZWQiOgogIHRydWUKCmRlZmluZSAiU2lja2xlIENlbGwgQXNzdW1lZCBBY3RpdmUiOgogIHRydWUKCi8vIEFjdGl2ZSBDYW5jZXIgVHJlYXRtZW50CmRlZmluZSAiQWN0aXZlIENhbmNlciBUcmVhdG1lbnQgRW5jb3VudGVycyBDb25kaXRpb24gSXMgRW5hYmxlZCI6CiAgdHJ1ZQoKLy8gT3Bpb2lkIE5haXZlCmRlZmluZSAiT3Bpb2lkIE5ha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XlzIENyaXRlcmlhIEVuYWJsZWQiOgogIHRydWUKCi8vIFJlY29tbWVuZGF0aW9uIDEwCmRlZmluZSAiT3BpYXRlIFVyaW5lIFNjcmVlbmluZyBDaGVjayBFbmFibGVkIjoKICB0cnVlCgpkZWZpbmUgIkNhbm5hYmlub2lkIFVyaW5lIFNjcmVlbmluZyBDaGVjayBFbmFibGVkIjoKICBmYWxzZQoKZGVmaW5lICJVc2UgQWx0ZXJuYXRpdmUgVURTIExvb2tiYWNrIFBlcmlvZCI6CiAgZmFsc2UKCmRlZmluZSAiQWx0ZXJuYXRpdmUgVURTIExvb2tiYWNrIFBlcmlvZCI6CiAgSW50ZXJ2YWxbVG9kYXkoKSAtIDYgbW9udGhzIC0gMSBkYXlzLCBUb2RheSgpXQoKLy8gUmVjb21tZW5kYXRpb24gMTIKZGVmaW5lICJFdmlkZW5jZSBCYXNlZCBUcmVhdG1lbnQgQ3JpdGVyaWEgRm9yIE9waW9pZCBVc2UgRGlzb3JkZXIiOgogIHRydWUK" ]
  ], [
     fhir:index 1;
     fhir:Attachment.contentType [ fhir:value "application/elm+xml" ];
     fhir:Attachment.data [ fhir:value "[encoded data, 16968 characters]" ]
  ], [
     fhir:index 2;
     fhir:Attachment.contentType [ fhir:value "application/elm+json" ];
     fhir:Attachment.data [ fhir:value "[encoded data, 28548 characters]" ]
  ] .

# -------------------------------------------------------------------------------------

