Skip to content

Commit

Permalink
Removed due date from medication request plan def as it isn't really …
Browse files Browse the repository at this point in the history
…relevant or clear to get from all antigens since the dose will be due at the time of creation and how long it has been due isn't needed.
  • Loading branch information
lukeaduncan committed Feb 7, 2024
1 parent 72afee4 commit 9043d91
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
16 changes: 8 additions & 8 deletions input/cql/IMMZD2DTMeaslesInput.cql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define "MCV Doses Administered to Patient":
@psuedocode: Count of vaccines administered (where "Vaccine type" = 'Measles containing vaccines' and "Type of dose" = "Primary series" ) = 0
*/
define "No measles primary series doses were administered":
not exists("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months)
not exists("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 9 months <= 0)

/*
@input: MCV0 was administered
Expand All @@ -48,37 +48,37 @@ define "MCV0 was not administered":
@pseudocode: Count of vaccines administered (where "Vaccine type" = 'Measles containing vaccines' and "Type of dose" = "Primary series" ) = 1
*/
define "MCV1 was administered High Tx":
Count("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months) = 1
Count("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 9 months <= 0) = 1

/*
@input: MCV2 was administered High Tx
@pseudocode: Count of vaccines administered (where "Vaccine type" = 'Measles containing vaccines' and "Type of dose" = "Primary series" ) = 2
*/
define "MCV2 was administered High Tx":
Count("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months) >= 2
and Count("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 15 months) >= 1
Count("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 9 months <= 0) >= 2
and Count("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 15 months <= 0) >= 1

/*
@input: MCV1 was administered Low Tx
@pseudocode: Count of vaccines administered (where "Vaccine type" = 'Measles containing vaccines' and "Type of dose" = "Primary series" ) = 1
*/
define "MCV1 was administered Low Tx":
Count("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 12 months) = 1
Count("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 12 months <= 0) = 1

/*
@input: MCV2 was administered Low Tx
@pseudocode: Count of vaccines administered (where "Vaccine type" = 'Measles containing vaccines' and "Type of dose" = "Primary series" ) = 2
*/
define "MCV2 was administered Low Tx":
Count("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 12 months) >= 2
and Count("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 15 months) >= 1
Count("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 12 months <= 0) >= 2
and Count("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 15 months <= 0) >= 1

/*
@input: Measles supplementary dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = 'Measles containing vaccines' and "Type of dose" = "Supplementary dose") = 1
*/
define "Measles supplementary dose was administered":
Count("MCV Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months) >= 3
Count("MCV Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 9 months <= 0) >= 3

/*
@input: Measles supplementary dose was not administered
Expand Down
6 changes: 0 additions & 6 deletions input/cql/IMMZD2DTYellowFever.cql
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ include IMMZD2DTYellowFeverInput called input
// End Skeleton CQL
context Patient

/*
@dynamicValue: Due date of the dose
*/
define "Due date of the dose":
Now()

/*
@dynamicValue: Guidance
*/
Expand Down
4 changes: 2 additions & 2 deletions input/cql/IMMZD2DTYellowFeverInput.cql
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ define "Yellow Fever Doses Administered to Patient":
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Yellow fever containing vaccines" and "Type of dose" = "Primary series" ) = 0
*/
define "No yellow fever primary series doses were administered":
not exists("Yellow Fever Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months)
not exists("Yellow Fever Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 9 months <= 0)

/*
@input: One yellow fever primary series dose was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Yellow fever containing vaccines" and "Type of dose" = "Primary series" ) = 1
*/
define "One yellow fever primary series dose was administered":
Count("Yellow Fever Doses Administered to Patient" I where I.occurrence after Patient.birthDate + 9 months) >= 1
Count("Yellow Fever Doses Administered to Patient" I where difference in days between I.occurrence and Patient.birthDate + 9 months <= 0) >= 1

/*
@input: Client's age is less than 6 months
Expand Down
6 changes: 0 additions & 6 deletions input/fsh/plandefinitions/IMMZPDrulesets.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ RuleSet: PlanDefMedicationRequestAction( title, description, condition, library
* expression
* language = #text/cql
* expression = "'proposal'"
* dynamicValue[+]
* path = "dispenseRequest.validityPeriod.start"
* expression
* description = "Due date of the dose"
* language = #text/cql-identifier
* expression = "Due date of the dose"

RuleSet: PlanDefMedicationRequestUpdate( title, description, condition, library, mrid )
* action[+]
Expand Down

0 comments on commit 9043d91

Please sign in to comment.