Skip to content
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ logs/
node_modules/
dist/
.idea/
.DS_Store
.DS_Store
tingo_db/
6 changes: 5 additions & 1 deletion env.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"WHITELIST": {
"type": "string",
"default": "http://localhost"
"default": "http://localhost, http://localhost:3005"
},
"LOGGING_LEVEL": {
"type": "string",
Expand All @@ -30,5 +30,9 @@
"AUTH_SERVER_URI": {
"type": "string",
"default": "http://localhost:8090"
},
"VSAC_KEY": {
"type": "string",
"default": "changeMe"
}
}
16 changes: 16 additions & 0 deletions patches/@projecttacoma+node-fhir-server-core+2.2.8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/node_modules/@projecttacoma/node-fhir-server-core/dist/server/resources/4_0_0/schemas/datarequirement.js b/node_modules/@projecttacoma/node-fhir-server-core/dist/server/resources/4_0_0/schemas/datarequirement.js
index ef49581..6868203 100644
--- a/node_modules/@projecttacoma/node-fhir-server-core/dist/server/resources/4_0_0/schemas/datarequirement.js
+++ b/node_modules/@projecttacoma/node-fhir-server-core/dist/server/resources/4_0_0/schemas/datarequirement.js
@@ -152,9 +152,9 @@ module.exports = class DataRequirement {
return;
}

- let Element = require('./element.js');
+ let CodeFilter = require('./datarequirementcodefilter.js');

- this.__data.codeFilter = Array.isArray(value) ? value.map(v => new Element(v)) : [new Element(value)];
+ this.__data.codeFilter = Array.isArray(value) ? value.map(v => new CodeFilter(v)) : [new CodeFilter(value)];
}
});
Object.defineProperty(this, 'dateFilter', {
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
45 changes: 45 additions & 0 deletions src/cds-library/CRD-DTR/IPledge/R4/files/IPledgeRule-0.1.0.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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/Isotretinoin_2021_10_8_REMS_Document.pdf'

define INFO_PATIENT_FactSheet:
'https://www.accessdata.fda.gov/drugsatfda_docs/rems/Isotretinoin_2021_10_8_Fact_Sheet.pdf'

define INFO_PATIENT_GuideForPatientsWhoCanGetPregnant:
'https://www.accessdata.fda.gov/drugsatfda_docs/rems/Isotretinoin_2021_10_8_Guide_for_Patients_Who_Can_Get_pregnant.pdf'
define INFO_PATIENT_ContraceptiveCounselingGuide:
'https://www.accessdata.fda.gov/drugsatfda_docs/rems/Isotretinoin_2021_10_8_Contraception_Counseling_Guide.pdf'
define INFO_PRESCRIBER_PrescriberGuide:
'https://www.accessdata.fda.gov/drugsatfda_docs/rems/Isotretinoin_2021_10_8_Prescriber_Guide.pdf'
define INFO_PRESCRIBER_ComprehensionQuestions:
'https://www.accessdata.fda.gov/drugsatfda_docs/rems/Isotretinoin_2021_10_8_Comprehension_Questions.pdf'

define RESULT_QuestionnaireOrderUri:
'Questionnaire/IPledgeRemsPatientEnrollment'

define RESULT_QuestionnairePrescriberEnrollmentUri:
'Questionnaire/IPledgeRemsPrescriberEnrollmentForm'

define RESULT_requestId:
medication_request

define RESULT_dispense:
medication_dispense
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"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": "https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.81"
}
]
},
{
"type": "Condition",
"codeFilter": [
{
"path": "code",
"valueSet": "https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.198"
}
]
},
{
"type": "Procedure",
"codeFilter": [
{
"path": "code",
"valueSet": "https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.90"
}
]
},
{
"type": "MedicationRequest",
"codeFilter": [
{
"path": "code",
"valueSet": "https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.192"
}
]
},
{
"type": "MedicationRequest",
"codeFilter": [
{
"path": "code",
"valueSet": "https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.193"
}
]
},
{
"type": "Observation"
},
{
"type": "MedicationStatement",
"codeFilter": [
{
"path": "code",
"valueSet": "https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1219.197"
}
]
}
],
"content": [
{
"contentType": "text/cql",
"data": "bGlicmFyeSBJUGxlZGdlUHJlcG9wdWxhdGlvbiAgdmVyc2lvbiAnMC4xLjAnCnVzaW5nIEZISVIgdmVyc2lvbiAnNC4wLjAnCmluY2x1ZGUgRkhJUkhlbHBlcnMgdmVyc2lvbiAnNC4wLjAnIGNhbGxlZCBGSElSSGVscGVycwppbmNsdWRlIENEU19Db25uZWN0X0NvbW1vbnNfZm9yX0ZIS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