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

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

[] a fhir:Library;
  fhir:Resource.id [ fhir:value "ConversionFactors"], [ fhir:value "options"];
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-shareablelibrary";
       fhir:index 0
     ], [
       fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-computablelibrary";
       fhir:index 1
     ], [
       fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-publishablelibrary";
       fhir:index 2
     ], [
       fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-executablelibrary";
       fhir:index 3
     ]
  ];
  fhir:DomainResource.extension [
     fhir:index 0;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "shareable" ]
  ], [
     fhir:index 1;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "computable" ]
  ], [
     fhir:index 2;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "publishable" ]
  ], [
     fhir:index 3;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "executable" ]
  ], [
     fhir:index 4;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel" ];
     fhir:Extension.value [ fhir:value "structured" ]
  ], [
     fhir:index 5;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions" ];
     fhir:Extension.value [
       fhir:Reference.reference [ fhir:value "#options" ]
     ]
  ];
  fhir:Library.url [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/ConversionFactors"];
  fhir:Library.version [ fhir:value "3.0.0"];
  fhir:Library.name [ fhir:value "ConversionFactors"];
  fhir:Library.title [ fhir:value "Morphine Milligram Equivalent (MME) Conversion Factors for FHIR R4"];
  fhir:Library.status [ fhir:value "active"];
  fhir:Library.experimental [ fhir:value "false"];
  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 "2022-02-01T20:35:24+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.description [ fhir:value "This library contains logic to expose configurable conversion factors for the MME calculation functionality provided by the OMTKLogic library."];
  fhir:Library.useContext [
     fhir:index 0;
     fhir:UsageContext.code [
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/usage-context-type" ];
       fhir:Coding.code [ fhir:value "focus" ];
       fhir:Coding.display [ fhir:value "Clinical Focus" ]
     ];
     fhir:UsageContext.value [
       a sct:182888003;
       fhir:CodeableConcept.coding [
         fhir:index 0;
         a sct:182888003;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
         fhir:Coding.code [ fhir:value "182888003" ];
         fhir:Coding.display [ fhir:value "Medication requested (situation)" ]
       ]
     ]
  ], [
     fhir:index 1;
     fhir:UsageContext.code [
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/usage-context-type" ];
       fhir:Coding.code [ fhir:value "focus" ];
       fhir:Coding.display [ fhir:value "Clinical Focus" ]
     ];
     fhir:UsageContext.value [
       a sct:82423001;
       fhir:CodeableConcept.coding [
         fhir:index 0;
         a sct:82423001;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
         fhir:Coding.code [ fhir:value "82423001" ];
         fhir:Coding.display [ fhir:value "Chronic pain (finding)" ]
       ]
     ]
  ];
  fhir:Library.jurisdiction [
     fhir:index 0;
     fhir:CodeableConcept.coding [ fhir:index 0 ]
  ];
  fhir:Library.usage [ fhir:value "NOTE: Do not use the calculated dose in MMEs to determine dosage for converting one opioid to another—the new opioid should be lower to avoid unintentional overdose caused by incomplete cross-tolerance and individual differences in opioid pharmacokinetics. Consult the medication label."];
  fhir:Library.copyright [ fhir:value "Copyright 2019+ Centers for Disease Control and Prevention (CDC)"];
  fhir:Library.lastReviewDate [ fhir:value "2020-09-26"];
  fhir:Library.topic [
     fhir:index 0;
     fhir:CodeableConcept.text [ fhir:value "Opioid Prescribing" ]
  ], [
     fhir:index 1;
     fhir:CodeableConcept.text [ fhir:value "Morphine Milligram Equivalent (MME)" ]
  ];
  fhir:Library.author [
     fhir:index 0;
     fhir:ContactDetail.name [ fhir:value "Floyd Eisenberg, MD, MPH" ]
  ], [
     fhir:index 1;
     fhir:ContactDetail.name [ fhir:value "Kensaku Kawamoto, MD, PhD, MHS" ]
  ], [
     fhir:index 2;
     fhir:ContactDetail.name [ fhir:value "Robert McClure, MD" ]
  ], [
     fhir:index 3;
     fhir:ContactDetail.name [ fhir:value "Bryn Rhodes" ]
  ];
  fhir:Library.relatedArtifact [
     fhir:index 0;
     fhir:RelatedArtifact.type [ fhir:value "citation" ];
     fhir:RelatedArtifact.label [ fhir:value "RxNORM" ];
     fhir:RelatedArtifact.display [ fhir:value "This product uses publicly available data courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services; NLM is not responsible for the product and does not endorse or recommend this or any other product." ];
     fhir:RelatedArtifact.citation [ fhir:value "Nelson SJ, Zeng K, Kilbourne J, Powell T, Moore R. Normalized names for clinical drugs: RxNorm at 6 years.<br/>J Am Med Inform Assoc. 2011 Jul-Aug;18(4)441-8. doi: 10.1136/amiajnl-2011-000116.<br/>Epub 2011 Apr 21. PubMed PMID: 21515544; PubMed Central PMCID: PMC3128404.<br/>[Full Text](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3128404/)" ];
     fhir:RelatedArtifact.url [ fhir:value "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3128404/" ];
     fhir:RelatedArtifact.document [
       fhir:Attachment.url [ fhir:value "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3128404/" ]
     ]
  ], [
     fhir:index 1;
     fhir:RelatedArtifact.type [ fhir:value "citation" ];
     fhir:RelatedArtifact.label [ fhir:value "UCUM" ];
     fhir:RelatedArtifact.display [ fhir:value "This product includes all or a portion of the UCUM table, UCUM codes, and UCUM definitions or is derived from it, subject to a license from Regenstrief Institute, Inc. and The UCUM Organization. Your use of the UCUM table, UCUM codes, UCUM definitions also is subject to this license, a copy of which is available at http://unitsofmeasure.org<br/> The current complete UCUM table, UCUM Specification are available for download at http://unitsofmeasure.org<br/>The UCUM table and UCUM codes are copyright © 1995-2009, Regenstrief Institute, Inc. and the Unified Codes for Units of Measures (UCUM) Organization. All rights reserved." ];
     fhir:RelatedArtifact.citation [ fhir:value "Schadow G, McDonald CJ. The Unified Code for Units of Measure. Regenstrief Institute, Inc. and the UCUM Organization, 2017. Version 2.1, Revision 442. http://unitsofmeasure.org" ];
     fhir:RelatedArtifact.url [ fhir:value "http://unitsofmeasure.org" ];
     fhir:RelatedArtifact.document [
       fhir:Attachment.url [ fhir:value "http://unitsofmeasure.org" ]
     ]
  ], [
     fhir:index 2;
     fhir:RelatedArtifact.type [ fhir:value "citation" ];
     fhir:RelatedArtifact.label [ fhir:value "CDC Clinical Practice Guideline for Prescribing Opioids for Pain" ];
     fhir:RelatedArtifact.display [ fhir:value "CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022" ];
     fhir:RelatedArtifact.citation [ fhir:value "Dowell D, Ragan KR, Jones CM, Baldwin GT, Chou R. CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022. MMWR Recomm Rep 2022;71(No. RR-3):1-95. DOI: http://dx.doi.org/10.15585/mmwr.rr7103a1" ];
     fhir:RelatedArtifact.url [ fhir:value "http://dx.doi.org/10.15585/mmwr.rr7103a1" ];
     fhir:RelatedArtifact.document [
       fhir:Attachment.url [ fhir:value "http://dx.doi.org/10.15585/mmwr.rr7103a1" ]
     ]
  ], [
     fhir:index 3;
     fhir:RelatedArtifact.type [ fhir:value "documentation" ];
     fhir:RelatedArtifact.label [ fhir:value "Conversion Factors" ];
     fhir:RelatedArtifact.display [ fhir:value "Conversion Factors" ];
     fhir:RelatedArtifact.url [ fhir:value "http://fhir.org/guides/cdc/opioid-mme-r4/conversion-factors.html" ];
     fhir:RelatedArtifact.document [
       fhir:Attachment.url [ fhir:value "http://fhir.org/guides/cdc/opioid-mme-r4/conversion-factors.html" ]
     ]
  ], [
     fhir:index 4;
     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 5;
     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 6;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Library CDCMMEClinicalConversionFactors" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/CDCMMEClinicalConversionFactors|3.0.0" ]
  ], [
     fhir:index 7;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Code system Usage Context Type" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://terminology.hl7.org/CodeSystem/usage-context-type" ]
  ], [
     fhir:index 8;
     fhir:RelatedArtifact.type [ fhir:value "depends-on" ];
     fhir:RelatedArtifact.display [ fhir:value "Code system CDC MME Usage Context Codes" ];
     fhir:RelatedArtifact.resource [ fhir:value "http://fhir.org/guides/cdc/opioid-mme-r4/CodeSystem/CDCMMEUsageContextCodes" ]
  ];
  fhir:Library.parameter [
     fhir:index 0;
     fhir:ParameterDefinition.name [ fhir:value "ErrorLevel" ];
     fhir:ParameterDefinition.use [ fhir:value "in" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "string" ]
  ], [
     fhir:index 1;
     fhir:ParameterDefinition.name [ fhir:value "ConversionFactorSupplementName" ];
     fhir:ParameterDefinition.use [ fhir:value "in" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "string" ]
  ], [
     fhir:index 2;
     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 3;
     fhir:ParameterDefinition.name [ fhir:value "ConversionFactorSupplement" ];
     fhir:ParameterDefinition.use [ fhir:value "out" ];
     fhir:ParameterDefinition.min [ fhir:value "0" ];
     fhir:ParameterDefinition.max [ fhir:value "1" ];
     fhir:ParameterDefinition.type [ fhir:value "CodeSystem" ]
  ];
  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" ];
     fhir:Attachment.data [ fhir:value "[encoded data, 14504 characters]" ]
  ], [
     fhir:index 1;
     fhir:Attachment.contentType [ fhir:value "application/elm+xml" ];
     fhir:Attachment.data [ fhir:value "[encoded data, 175480 characters]" ]
  ], [
     fhir:index 2;
     fhir:Attachment.contentType [ fhir:value "application/elm+json" ];
     fhir:Attachment.data [ fhir:value "[encoded data, 337040 characters]" ]
  ] .

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

