@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 "OpioidCDSREC08"], [ 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/OpioidCDSREC08"];
  fhir:Library.version [ fhir:value "2022.1.0"];
  fhir:Library.name [ fhir:value "OpioidCDSREC08"];
  fhir:Library.title [ fhir:value "Library - Recommendation #8 - Naloxone Consideration"];
  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.relatedArtifact [
     fhir:index 0;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "FHIR model information" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" ]
  ], [
     fhir:index 1;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Library FHIRHelpers" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers|4.0.1" ]
  ], [
     fhir:index 2;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Library Common" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon|2022.1.0" ]
  ], [
     fhir:index 3;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Library Config" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig|2022.1.0" ]
  ], [
     fhir:index 4;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Library Routines" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines|2022.1.0" ]
  ], [
     fhir:index 5;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Library MMECalculator" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/MMECalculator|3.0.0" ]
  ];
  fhir:Library.parameter [
     fhir:index 0;
     fhir:ParameterDefinition.name [ fhir:value "ContextPrescriptions" ];
     fhir:ParameterDefinition.use [ fhir:value "in" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "*" ];
     fhir:ParameterDefinition.type [ fhir:value "MedicationRequest" ]
  ], [
     fhir:index 1;
     fhir:ParameterDefinition.name [ fhir:value "Patient" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "Patient" ]
  ], [
     fhir:index 2;
     fhir:ParameterDefinition.name [ fhir:value "Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "*" ];
     fhir:ParameterDefinition.type [ fhir:value "MedicationRequest" ]
  ], [
     fhir:index 3;
     fhir:ParameterDefinition.name [ fhir:value "Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential" ];
     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 "Inclusion Criteria" ];
     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 "Is Recommendation Applicable?" ];
     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.dataRequirement [
     fhir:index 0;
     fhir:DataRequirement.type [ fhir:value "Patient" ];
     fhir:DataRequirement.profile [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Patient";
       fhir:index 0
     ]
  ];
  fhir:Library.content [
     fhir:index 0;
     fhir:Attachment.contentType [ fhir:value "text/cql" ];
     fh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XB0aW9uPyIoIEFtYnVsYXRvcnlPcGlvaWRQcmVzY3JpcHRpb24gKQoKZGVmaW5lICJQYXRpZW50IElzIEJlaW5nIFByZXNjcmliZWQgT3Bpb2lkIEFuYWxnZXNpYyB3aXRoIEFtYnVsYXRvcnkgTWlzdXNlIFBvdGVudGlhbCI6CiAgZXhpc3RzKCAiQ2hyb25pYyBQYWluIE9waW9pZCBBbmFsZ2VzaWMgd2l0aCBBbWJ1bGF0b3J5IE1pc3VzZSBQb3RlbnRpYWwgUHJlc2NyaXB0aW9ucyIgKQoKZGVmaW5lICJJbmNsdXNpb24gQ3JpdGVyaWEiOgogICJQYXRpZW50IElzIEJlaW5nIFByZXNjcmliZWQgT3Bpb2lkIEFuYWxnZXNpYyB3aXRoIEFtYnVsYXRvcnkgTWlzdXNlIFBvdGVudGlhbCIKICAgIGFuZCBSb3V0aW5lcy4iQ0RDIDIwMjIgR3VpZGVsaW5lIEdlbmVyYWwgSW5jbHVzaW9uIENyaXRlcmlhIgoKZGVmaW5lICJJcyBSZWNvbW1lbmRhdGlvbiBBcHBsaWNhYmxlPyI6CiAgIkluY2x1c2lvbiBDcml0ZXJpYSIK" ]
  ], [
     fhir:index 1;
     fhir:Attachment.contentType [ fhir:value "application/elm+xml" ];
     fhir:Attachment.data [ fhir:value "[encoded data, 16888 characters]" ]
  ], [
     fhir:index 2;
     fhir:Attachment.contentType [ fhir:value "application/elm+json" ];
     fhir:Attachment.data [ fhir:value "[encoded data, 25884 characters]" ]
  ] .

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

