Personal tools
You are here: Home / OSCAR EMR 12.x / 4.0 Developers / 4.7 Tweaks / 4.7.1 Adding Preventions

4.7.1 Adding Preventions

NOTE ONTARIO USERS - NOT FOR YOU as of OSCAR 12 (Ontario MD CMS 4 certified version) any modifications to certified code risks invalidating the installation as being able to attract subsidy in Ontario. The newly added Ontario immunizations including rotavirus and MMRV have been folded into the regular code for everyone. The default prevention suffice in many cases, but sometimes you need to be able to localise for a given practice, community or change it according to developing standards and schedules.

Prevention Tweaking

The prevention module has a list of possible interventions that currently can only be altered manually using the following procedure

  1.  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)
  2. 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
  3. Adapt the prevention XML files to add the particular entity
  4. 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

   <rule name="Rot 1">
       <parameter identifier="prev">
           <class>oscar.oscarPrevention.Prevention</class>
       </parameter>
       <java:condition>prev.getAgeInMonths() &gt;= 2</java:condition>
       <java:condition>prev.getAgeInMonths() &lt; 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() &gt;= 4</java:condition>
       <java:condition>prev.getAgeInMonths() &lt;= 6</java:condition>
       <java:condition>prev.getNumberOfPreventionType("Rot") == 1</java:condition>
       <java:condition>prev.getHowManyMonthsSinceLast("Rot") &gt;= 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)

       <item desc="Rot-1=Rotavirus Vaccine" name="Rot"
               link="www.novaccine.com/pdffiles/Rotarix_new_package_insert.pdf"
               layout="injection" atc="J07BH01" minAge="0" maxAge="2"
               showIfMinRecordNum="1" />

 

PreventionItems.xml  (v12)

       <item resultDesc=""
               desc="Rot-1=Rotavirus Vaccine" name="Rot"
               healthCanadaType="" link="www.novaccine.com/pdffiles/Rotarix_new_package_insert.pdf"
               layout="injection" atc="J07BH01" minAge="0" maxAge="2"
               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