4.7.1 Adding Preventions
Prevention Tweaking
The prevention module has a list of possible interventions that currently can only be altered manually using the following procedure
- you have to establish and then code the clinical rules that are appropriate for that intervention (you probably don't need to be a doctor to do so - but it is easiest to source those rules from a doctor or a nurse)
- Then code the rule as an xml in a specified format that gets appended to a file that in this instance is called prevention.drl
- Adapt the prevention XML files to add the particular entity
- I reload the oscar app in Tomcat to apply the new drools. Obviously reloading Tomcat would do as well or rebooting the machine
by example (Note Rotavirus has already been added to Oscar 11x) the Rotavirus vaccine has strictly defined time frames for administration (between 6 weeks of age and 20 weeks) two doses need to be given no less than 4 weeks apart as according to NACI
So adapting those recommendations can be done with the following drools (rounded to the month)
TIP: for further drool syntax examples see http://www.jboss.org/drools/
prevention.drl
<parameter identifier="prev">
<class>oscar.oscarPrevention.Prevention</class>
</parameter>
<java:condition>prev.getAgeInMonths() >= 2</java:condition>
<java:condition>prev.getAgeInMonths() < 5</java:condition>
<java:condition>prev.getNumberOfPreventionType("Rot") == 0</java:condition>
<java:condition>!prev.isPreventionNever("Rot")</java:condition>
<java:consequence>
System.out.println("Rot 1");
prev.addWarning("Rot 1", "Needs First Rot-1 vaccine");
</java:consequence>
</rule>
<rule name="Rot 2">
<parameter identifier="prev">
<class>oscar.oscarPrevention.Prevention</class>
</parameter>
<java:condition>prev.getAgeInMonths() >= 4</java:condition>
<java:condition>prev.getAgeInMonths() <= 6</java:condition>
<java:condition>prev.getNumberOfPreventionType("Rot") == 1</java:condition>
<java:condition>prev.getHowManyMonthsSinceLast("Rot") >= 1</java:condition>
<java:condition>!prev.isPreventionNever("Rot")</java:condition>
<java:condition>prev.isNextDateSet("Rot")</java:condition>
<java:consequence>
System.out.println("Rot 2");
prev.addWarning("Rot 2", "Needs Second Rot-1 vaccine");
</java:consequence>
</rule>
Of course the vaccine needs to be listed so make entries in the following files as below
PreventionConfigSet.xml
<set title="Childhood Immunization" effective="(August 2011)"
minAge="0" maxAge="19"
prevList="DTaP-IPV,Hib,Pneu-C,MMR,MenC-C,VZ,HepB,dTap,Td,Flu,Rot" />
PreventionItems.xml (v10)
link="www.novaccine.com/pdffiles/Rotarix_new_package_insert.pdf"
layout="injection" atc="J07BH01" minAge="0" maxAge="2"
showIfMinRecordNum="1" />
PreventionItems.xml (v12)
healthCanadaType="" link="www.novaccine.com/pdffiles/Rotarix_new_package_insert.pdf"
showIfMinRecordNum="1" />
These files are located in /var/lib/tomcat6/webapps/Oscar12_1/WEB-INF/classes/oscar/oscarPrevention/
(The Oscar12_1 may be different for your installation. It is the same as the .war file)
If you change these files, make a backup copy. These files will be replaced if you upgrade Oscar or redeploy the Oscar.war file.
Document Actions