Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CRD-DTR/IPledge/R4/files/IPledgePrepopulation-0.1.0.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
library IPledgePrepopulation version '0.1.0'
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0' called FHIRHelpers
include CDS_Connect_Commons_for_FHIRv400 version '1.0.2' called CDS
include DTRHelpers version '0.1.0' called DTR

codesystem "ICD-10-CM": 'http://hl7.org/fhir/sid/icd-10-cm'
codesystem "LOINC": 'http://loinc.org'
codesystem "SNOMED-CT": 'http://snomed.info/sct'
codesystem "RXNORM": 'http://www.nlm.nih.gov/research/umls/rxnorm'
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
library IPledgePrescriberEnrollmentPrepopulation version '0.1.0'
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0' called FHIRHelpers

codesystem "ICD-10-CM": 'http://hl7.org/fhir/sid/icd-10-cm'
codesystem "LOINC": 'http://loinc.org'
codesystem "SNOMED-CT": 'http://snomed.info/sct'
codesystem "RXNORM": 'http://www.nlm.nih.gov/research/umls/rxnorm'

code "Oncologist":'394592004' from "SNOMED-CT"

parameter device_request DeviceRequest
parameter service_request ServiceRequest
parameter medication_request MedicationRequest

context Patient

define Today: Today()

define "SigningProviderReference": Coalesce(device_request.performer.reference.value, service_request.performer.reference.value, medication_request.requester.reference.value)
// Get Practitioner
define OrderingProvider: singleton from (
[Practitioner] practitioner
where ('Practitioner/' + practitioner.id) = SigningProviderReference)

define Qualifications: singleton from (
"OrderingProvider".qualification[0].code.coding[0].code.value)

define Credentials: {Qualifications}

define PractitionerRole: singleton from (
[PractitionerRole] prole
where (prole.practitioner.reference.value) = SigningProviderReference)

define Specialty: FHIRHelpers.ToConcept("PractitionerRole".specialty[0] as FHIR.CodeableConcept).codes

define PreferredCommunication: {(singleton from (
"OrderingProvider".telecom telecom where telecom.rank.value = 1)).system.value}

define OrgName: ([Organization] org).name.value

define MD: (singleton from (
"OrderingProvider".identifier identifier
where identifier.type.coding[0].code = 'MD')).value.value

define ValidIPledgeCredentials:
from "OrderingProvider".qualification qualification
where qualification.identifier.system.value = 'http://www.nlm.nih.gov/research/umls/rxnorm' and qualification.identifier.value.value = '6064'

define ThirdPartyCredentials: ValidIPledgeCredentials[0].code.text.value
define ThirdPartyIssuer: ValidIPledgeCredentials[0].issuer.display.value
33 changes: 33 additions & 0 deletions CRD-DTR/IPledge/R4/files/IPledgeRule-0.1.0.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
library IPledgeRule version '0.1.0'
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0' called FHIRHelpers


parameter Patient Patient
parameter medication_request MedicationRequest
parameter medication_dispense MedicationDispense
parameter medication_statement MedicationStatement

define RULE_APPLIES:
true

define PRIORAUTH_REQUIRED:
false

define DOCUMENTATION_REQUIRED:
true

define RESULT_InfoLink:
'https://www.accessdata.fda.gov/drugsatfda_docs/rems/IPledge_2020_08_04_REMS_Full.pdf'

define RESULT_QuestionnaireOrderUri:
'Questionnaire/IPledgeRemsPatientEnrollment'

define RESULT_QuestionnairePrescriberEnrollmentUri:
'Questionnaire/IPledgeRemsPrescriberEnrollmentForm'

define RESULT_requestId:
medication_request

define RESULT_dispense:
medication_dispense
95 changes: 95 additions & 0 deletions CRD-DTR/IPledge/R4/resources/Library-R4-IPledge-prepopulation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"resourceType": "Library",
"id": "IPledge-prepopulation",
"url": "http://hl7.org/fhir/us/davinci-dtr/Library/IPledge-prepopulation",
"name": "IPledge-prepopulation",
"version": "0.1.0",
"title": "IPledge Prepopulation",
"status": "draft",
"type": {
"coding": [
{
"code": "logic-library"
}
]
},
"relatedArtifact": [
{
"type": "depends-on",
"resource": "Library/FHIRHelpers-4.0.0"
},
{
"type": "depends-on",
"resource": "Library/CDS_Connect_Commons_for_FHIRv400"
},
{
"type": "depends-on",
"resource": "Library/DTRHelpers"
}
],
"dataRequirement": [
{
"type": "Condition",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.81"
}
]
},
{
"type": "Condition",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.198"
}
]
},
{
"type": "Procedure",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.90"
}
]
},
{
"type": "MedicationRequest",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.192"
}
]
},
{
"type": "MedicationRequest",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.193"
}
]
},
{
"type": "Observation"
},
{
"type": "MedicationStatement",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.197"
}
]
}
],
"content": [
{
"contentType": "application/elm+json",
"url": "files/IPledge/r4/IPledgePrepopulation-0.1.0.cql"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"resourceType": "Library",
"id": "IPledgePrescriberEnrollment-prepopulation",
"url": "http://hl7.org/fhir/us/davinci-dtr/Library/IPledgePrescriberEnrollment-prepopulation",
"name": "IPledgePrescriberEnrollment-prepopulation",
"version": "0.1.0",
"title": "IPledgePrescriberEnrollment Prepopulation",
"status": "draft",
"type": {
"coding": [
{
"code": "logic-library"
}
]
},
"relatedArtifact": [
{
"type": "depends-on",
"resource": "Library/FHIRHelpers-4.0.0"
},
{
"type": "depends-on",
"resource": "Library/CDS_Connect_Commons_for_FHIRv400"
},
{
"type": "depends-on",
"resource": "Library/DTRHelpers"
}
],
"dataRequirement": [
{
"type": "Condition",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.81"
}
]
},
{
"type": "Condition",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.198"
}
]
},
{
"type": "Procedure",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.90"
}
]
},
{
"type": "MedicationRequest",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.192"
}
]
},
{
"type": "MedicationRequest",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.193"
}
]
},
{
"type": "Observation"
},
{
"type": "MedicationStatement",
"codeFilter": [
{
"path": "code",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.197"
}
]
},
{
"type": "Practitioner"
},
{
"type": "PractitionerRole",
"subjectCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/subject-type",
"code": "Practitioner"
}
]
}
}
],
"content": [
{
"contentType": "application/elm+json",
"url": "files/IPledge/r4/IPledgePrescriberEnrollmentPrepopulation-0.1.0.cql"
}
]
}
Loading