SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Forward Chaining Inference vs. Binary Decision Support in an Electronic
          Health Record Application Based on Archetyped Data

                                               Luciana Tricai Cavalini , Sergio Miranda Freire , Timothy Wayne Cook
                                                                                  a                                         b                                                                               c



                                                   Departament of Epidemiology and Biostatistics, Fluminense Federal University, Brazil
                                                            a

                                                             b
                                                               Medical Sciences College, Rio de Janeiro State University, Brazil
                                           c
                                             National Institute of Science and Technology – Medicine Assisted by Scientific Computing, Brazil


The purpose of this poster is to investigate the effects of two common approaches to decision support in electronic health
record applications. The uniqueness is that this electronic health record uses archetyped data based on the multi-level
modeling principles initially described in the openEHR specifications which were foundational to the formation of the ISO and
CEN 13606 Eletronic Health Record standards.
The objectives were to determine the best approach to decision support development and maintenance in a small purpose
specific application and to also provide an open source platform for the rapid construction of interoperable, purpose
specific healthcare applications and tools using robust, modern technologies including web services connectivity,
programming language and persistence layer agnostic specifications and internationalization and localization for global
application reuse-ability especially applicable to the world of non-governmental agencies working in developing nations
where the areas of meaningful use and measurement and evaluation can be a great challenge.

Introduction
The typical SQL data model approach to health care application design and development is well documented to cause
interoperability and ongoing software maintenance issues. The information model approach; using a generic reference
model built in software with single concept knowledge components represented as runtime, semantically contextual data
containers, provide a mechanism of ex-changing information between systems based on the same reference model but
that may not have necessarily had the purpose when created. The demonstration application will be available as part of
the Open Source Health Information Platform (OSHIP) Project.

Methods
We created a demonstration application using OSHIP since it is a full application server based on the openEHR specifications
and includes the C Language Inference Processing System (CLIPS) forward chaining RETE algorithm based engine. The
application was designed as a blood pressure registry system. The use case scenario was to monitor the self reported blood
pressure readings from a small town population of patients considered at risk for hypertension.
The initial testing methods used hand entered data and application timing routines to measure the performance differences
in detecting the “at risk” characteristics at each patient entry, across each patient's history and across the population.

Results
The preliminary results show that the CLIPS rules syntax had a higher learning curve initially. But that was short lived and it
was quickly found that creating the CLIPS rules in the Python language was less error prone and more rapidly performed
than using the normal if/then constructs. The code size for the same number of decision points is approximately 40% less
using CLIPS rules and execution time with 100 patient entries is 10 times faster in the CLIPS portion of the code.
A robust functional testing suite that will produce automated testing data to bring the numbers of patients and entries per
patient into the tens of thousands will be used for the demonstration.
 # Hep B                                                                                         # Build the rules
 if self.hepatitisB == 0: # any age                                                                  ageRule = clips.BuildRule("age-rule", "(immunizations (age ?x&:(< 180 ?x)))", "(assert (too_old))", "The age Limit Rule.")
    self.resultstxt += "<li>Needs Hepatitis B #1</li> "                                              hepatitisB1Rule = clips.BuildRule("hepatitisB1-rule", "(immunizations (HepB ?x&:(= 0 ?x)))", "(assert (hepatitisB1))", "The HepatitisB Dose #1 Rule")
 elif self.hepatitisB == 1 and self.age >= 30:                                                       hepatitisB2Rule = clips.BuildRule("hepatitisB2-rule", "(immunizations (HepB ?x&:(= 1 ?x)) (age ?y&:(<= 30 ?y)))", "(assert (hepatitisB2))","The HepatitisB
    self.resultstxt += "<li>Needs Hepatitis B #2</li> "                                        Dose #2 Rule")
 elif self.hepatitisB == 2 and self.age >= 120:                                                      hepatitisB3Rule = clips.BuildRule("hepatitisB3-rule", "(immunizations (HepB ?x&:(= 2 ?x)) (age ?y&:(<= 120 ?y)))", "(assert (hepatitisB3))","The HepatitisB
    self.resultstxt += "<li>Needs Hepatitis B #3</li> "                                        Dose #3 Rule")
                                                                                                     tetra1Rule = clips.BuildRule("tetra1-rule", "(immunizations (tetra ?x&:(= 0 ?x)) (age ?y&:(<= 60 ?y)))", "(assert (tetra1))","The tetra Dose #1 Rule")



                                                                             Code in
 # tetravalent (DTP+Hib)                                                                             tetra2Rule = clips.BuildRule("tetra2-rule", "(immunizations (tetra ?x&:(= 1 ?x)) (age ?y&:(<= 120 ?y)))", "(assert (tetra2))","The tetra Dose #2 Rule")
 if self.age >= 60:                                                                                  tetra3Rule = clips.BuildRule("tetra3-rule", "(immunizations (tetra ?x&:(= 2 ?x)) (age ?y&:(= 180 ?y)))", "(assert (tetra3))","The tetra Dose #3 Rule")
    if self.tetravalent == 0:                                                                        polio1Rule = clips.BuildRule("polio1-rule", "(immunizations (polio ?x&:(= 0 ?x)) (age ?y&:(<= 60 ?y)))", "(assert (polio1))","The polio Dose #1 Rule")
       self.resultstxt += "<li>Needs Tetravalent (DTP+Hib) Dose #1</li> "                            polio2Rule = clips.BuildRule("polio2-rule", "(immunizations (polio ?x&:(= 1 ?x)) (age ?y&:(<= 120 ?y)))", "(assert (polio2))","The polio Dose #2 Rule")
    elif self.tetravalent == 1 and self.age >= 120:                                                  polio3Rule = clips.BuildRule("polio3-rule", "(immunizations (polio ?x&:(= 2 ?x)) (age ?y&:(= 180 ?y)))", "(assert (polio3))","The polio Dose #3 Rule")


                                                                             Boolean
       self.resultstxt += "<li>Needs Tetravalent (DTP+Hib) Dose #2</li> "                            rota1Rule = clips.BuildRule("rota1-rule", "(immunizations (rota ?x&:(= 0 ?x)) (age ?y&:(<= 60 ?y)))", "(assert (rota1))","The rotavirus Dose #1 Rule")
    elif self.tetravalent == 2 and self.age == 180:                                                  rota2Rule = clips.BuildRule("rota2-rule", "(immunizations (rota ?x&:(= 1 ?x)) (age ?y&:(<= 90 ?y)))", "(assert (rota2))","The rotavirus Dose #2 Rule")
       self.resultstxt += "<li>Needs Tetravalent (DTP+Hib) Dose #3</li> "

 # polio


                                                                            expressions
 if self.age >= 60:
    if self.polio == 0:


                                                                                                                                        Code in PyCLIPS
       self.resultstxt += "<li>Needs Polio Dose #1</li> "
    elif self.polio == 1 and self.age >= 120:
       self.resultstxt += "<li>Needs Polio Dose #2</li> "
    elif self.polio == 2 and self.age == 180:
       self.resultstxt += "<li>Needs Polio Dose #3</li> "

 # rotavirus
 if self.age >= 60:
    if self.rotavirus == 0:
       self.resultstxt += "<li>Needs Rotavirus Dose #1</li> "
    elif self.rotavirus == 1 and self.age >= 90:
       self.resultstxt += "<li>Needs Rotavirus Dose #2</li> "




                                                                               Visit us at http://www.mlhim.org

Weitere ähnliche Inhalte

Ähnlich wie Poster MEDINFO 2010

BioAssay Express: Creating and exploiting assay metadata
BioAssay Express: Creating and exploiting assay metadataBioAssay Express: Creating and exploiting assay metadata
BioAssay Express: Creating and exploiting assay metadata
Philip Cheung
 
Impact.Tech "Statistical Literacy for Deep Tech"
Impact.Tech "Statistical Literacy for Deep Tech"Impact.Tech "Statistical Literacy for Deep Tech"
Impact.Tech "Statistical Literacy for Deep Tech"
Impact.Tech
 
Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...
Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...
Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...
Manuel GEA - Bio-Modeling Systems
 
Analysis of DNA methylation and Gene expression to predict childhood obesity
Analysis of DNA methylation and Gene expression to predict childhood obesityAnalysis of DNA methylation and Gene expression to predict childhood obesity
Analysis of DNA methylation and Gene expression to predict childhood obesity
sahirbhatnagar
 

Ähnlich wie Poster MEDINFO 2010 (20)

Laboratory Assays Cross-sectional Incidence Testing, Blood Spots, and HIV Vir...
Laboratory AssaysCross-sectional Incidence Testing, Blood Spots, and HIV Vir...Laboratory AssaysCross-sectional Incidence Testing, Blood Spots, and HIV Vir...
Laboratory Assays Cross-sectional Incidence Testing, Blood Spots, and HIV Vir...
 
Supporting high throughput high-biotechnologies in today’s research environme...
Supporting high throughput high-biotechnologies in today’s research environme...Supporting high throughput high-biotechnologies in today’s research environme...
Supporting high throughput high-biotechnologies in today’s research environme...
 
Cross-Kingdom Standards in Genomics, Epigenomics and Metagenomics
Cross-Kingdom Standards in Genomics, Epigenomics and MetagenomicsCross-Kingdom Standards in Genomics, Epigenomics and Metagenomics
Cross-Kingdom Standards in Genomics, Epigenomics and Metagenomics
 
2013 alumni-webinar
2013 alumni-webinar2013 alumni-webinar
2013 alumni-webinar
 
PubChem and Big Data Chemistry
PubChem and Big Data ChemistryPubChem and Big Data Chemistry
PubChem and Big Data Chemistry
 
Math modeling
Math modelingMath modeling
Math modeling
 
Enhancing Reproducibility and Transparency in Clinical Research through Seman...
Enhancing Reproducibility and Transparency in Clinical Research through Seman...Enhancing Reproducibility and Transparency in Clinical Research through Seman...
Enhancing Reproducibility and Transparency in Clinical Research through Seman...
 
Slides for st judes
Slides for st judesSlides for st judes
Slides for st judes
 
Health, Data Analytics and Decision Support
Health, Data Analytics and Decision SupportHealth, Data Analytics and Decision Support
Health, Data Analytics and Decision Support
 
BioAssay Express: Creating and exploiting assay metadata
BioAssay Express: Creating and exploiting assay metadataBioAssay Express: Creating and exploiting assay metadata
BioAssay Express: Creating and exploiting assay metadata
 
Impact.Tech "Statistical Literacy for Deep Tech"
Impact.Tech "Statistical Literacy for Deep Tech"Impact.Tech "Statistical Literacy for Deep Tech"
Impact.Tech "Statistical Literacy for Deep Tech"
 
Final_Presentation.pptx
Final_Presentation.pptxFinal_Presentation.pptx
Final_Presentation.pptx
 
Bioinformatica 29-09-2011-t1-bioinformatics
Bioinformatica 29-09-2011-t1-bioinformaticsBioinformatica 29-09-2011-t1-bioinformatics
Bioinformatica 29-09-2011-t1-bioinformatics
 
The Changing Nature of Biomedical Research: Semantic e-Science
The Changing Nature of Biomedical Research: Semantic e-Science The Changing Nature of Biomedical Research: Semantic e-Science
The Changing Nature of Biomedical Research: Semantic e-Science
 
2015 6 bd2k_biobranch_knowbio
2015 6 bd2k_biobranch_knowbio2015 6 bd2k_biobranch_knowbio
2015 6 bd2k_biobranch_knowbio
 
Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...
Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...
Conference-The-future-will-be-digital-and-biology-but who-will-lead-watson-go...
 
Collaborative Database and Computational Models for Tuberculosis Drug Discovery
Collaborative Database and Computational Models for Tuberculosis Drug DiscoveryCollaborative Database and Computational Models for Tuberculosis Drug Discovery
Collaborative Database and Computational Models for Tuberculosis Drug Discovery
 
Analysis of DNA methylation and Gene expression to predict childhood obesity
Analysis of DNA methylation and Gene expression to predict childhood obesityAnalysis of DNA methylation and Gene expression to predict childhood obesity
Analysis of DNA methylation and Gene expression to predict childhood obesity
 
Jack Tuszynski Accelerating Chemotherapy Drug Discovery with Analytics and Hi...
Jack Tuszynski Accelerating Chemotherapy Drug Discovery with Analytics and Hi...Jack Tuszynski Accelerating Chemotherapy Drug Discovery with Analytics and Hi...
Jack Tuszynski Accelerating Chemotherapy Drug Discovery with Analytics and Hi...
 
Exploiting NLP for Digital Disease Informatics
Exploiting NLP for Digital Disease InformaticsExploiting NLP for Digital Disease Informatics
Exploiting NLP for Digital Disease Informatics
 

Mehr von Timothy Cook

AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...
AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...
AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...
Timothy Cook
 

Mehr von Timothy Cook (20)

Becoming Datacentric
Becoming DatacentricBecoming Datacentric
Becoming Datacentric
 
MLHIM @ CAIS 2014 - Buenos Aries
MLHIM @ CAIS 2014 - Buenos Aries MLHIM @ CAIS 2014 - Buenos Aries
MLHIM @ CAIS 2014 - Buenos Aries
 
AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...
AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...
AeHIN 28 August, 2014 - Innovation in Healthcare IT Standards: The Path to Bi...
 
MLHIM FHIES 2013
MLHIM FHIES 2013 MLHIM FHIES 2013
MLHIM FHIES 2013
 
MedWeb 3.0 @ CAIS 2013
MedWeb 3.0  @ CAIS 2013MedWeb 3.0  @ CAIS 2013
MedWeb 3.0 @ CAIS 2013
 
Presentation at the Escola Regional de Computação Aplicada à Saúde
Presentation at the Escola Regional de Computação Aplicada à SaúdePresentation at the Escola Regional de Computação Aplicada à Saúde
Presentation at the Escola Regional de Computação Aplicada à Saúde
 
Poster IHI 2012
Poster IHI 2012Poster IHI 2012
Poster IHI 2012
 
Poster IHI 2012
Poster IHI 2012Poster IHI 2012
Poster IHI 2012
 
Poster IHI 2012
Poster IHI 2012Poster IHI 2012
Poster IHI 2012
 
Poster CBIS 2012
Poster CBIS 2012Poster CBIS 2012
Poster CBIS 2012
 
Poster CBIS 2012
Poster CBIS 2012Poster CBIS 2012
Poster CBIS 2012
 
Presentation WIN 2012
Presentation WIN 2012Presentation WIN 2012
Presentation WIN 2012
 
Presentation HealthCom 2012
Presentation HealthCom 2012Presentation HealthCom 2012
Presentation HealthCom 2012
 
Presentation WIM 2011
Presentation WIM 2011Presentation WIM 2011
Presentation WIM 2011
 
Poster CBTMs 2011
Poster CBTMs 2011Poster CBTMs 2011
Poster CBTMs 2011
 
Timothy Cook, MSc. presents MLHIM @ WSCHA 2010
Timothy Cook, MSc. presents MLHIM @ WSCHA 2010Timothy Cook, MSc. presents MLHIM @ WSCHA 2010
Timothy Cook, MSc. presents MLHIM @ WSCHA 2010
 
Presentation WSCHA 2010 - in portuguese
Presentation WSCHA 2010 - in portuguesePresentation WSCHA 2010 - in portuguese
Presentation WSCHA 2010 - in portuguese
 
Presentation WSCHA 2010 - in English
Presentation WSCHA 2010 - in EnglishPresentation WSCHA 2010 - in English
Presentation WSCHA 2010 - in English
 
Presentation Minicourse for Summer Program LNCC 2010
Presentation Minicourse for Summer Program  LNCC 2010Presentation Minicourse for Summer Program  LNCC 2010
Presentation Minicourse for Summer Program LNCC 2010
 
Presentation Python Brasil [6] 2010
Presentation Python Brasil [6] 2010Presentation Python Brasil [6] 2010
Presentation Python Brasil [6] 2010
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Poster MEDINFO 2010

  • 1. Forward Chaining Inference vs. Binary Decision Support in an Electronic Health Record Application Based on Archetyped Data Luciana Tricai Cavalini , Sergio Miranda Freire , Timothy Wayne Cook a b c Departament of Epidemiology and Biostatistics, Fluminense Federal University, Brazil a b Medical Sciences College, Rio de Janeiro State University, Brazil c National Institute of Science and Technology – Medicine Assisted by Scientific Computing, Brazil The purpose of this poster is to investigate the effects of two common approaches to decision support in electronic health record applications. The uniqueness is that this electronic health record uses archetyped data based on the multi-level modeling principles initially described in the openEHR specifications which were foundational to the formation of the ISO and CEN 13606 Eletronic Health Record standards. The objectives were to determine the best approach to decision support development and maintenance in a small purpose specific application and to also provide an open source platform for the rapid construction of interoperable, purpose specific healthcare applications and tools using robust, modern technologies including web services connectivity, programming language and persistence layer agnostic specifications and internationalization and localization for global application reuse-ability especially applicable to the world of non-governmental agencies working in developing nations where the areas of meaningful use and measurement and evaluation can be a great challenge. Introduction The typical SQL data model approach to health care application design and development is well documented to cause interoperability and ongoing software maintenance issues. The information model approach; using a generic reference model built in software with single concept knowledge components represented as runtime, semantically contextual data containers, provide a mechanism of ex-changing information between systems based on the same reference model but that may not have necessarily had the purpose when created. The demonstration application will be available as part of the Open Source Health Information Platform (OSHIP) Project. Methods We created a demonstration application using OSHIP since it is a full application server based on the openEHR specifications and includes the C Language Inference Processing System (CLIPS) forward chaining RETE algorithm based engine. The application was designed as a blood pressure registry system. The use case scenario was to monitor the self reported blood pressure readings from a small town population of patients considered at risk for hypertension. The initial testing methods used hand entered data and application timing routines to measure the performance differences in detecting the “at risk” characteristics at each patient entry, across each patient's history and across the population. Results The preliminary results show that the CLIPS rules syntax had a higher learning curve initially. But that was short lived and it was quickly found that creating the CLIPS rules in the Python language was less error prone and more rapidly performed than using the normal if/then constructs. The code size for the same number of decision points is approximately 40% less using CLIPS rules and execution time with 100 patient entries is 10 times faster in the CLIPS portion of the code. A robust functional testing suite that will produce automated testing data to bring the numbers of patients and entries per patient into the tens of thousands will be used for the demonstration. # Hep B # Build the rules if self.hepatitisB == 0: # any age ageRule = clips.BuildRule("age-rule", "(immunizations (age ?x&:(< 180 ?x)))", "(assert (too_old))", "The age Limit Rule.") self.resultstxt += "<li>Needs Hepatitis B #1</li> " hepatitisB1Rule = clips.BuildRule("hepatitisB1-rule", "(immunizations (HepB ?x&:(= 0 ?x)))", "(assert (hepatitisB1))", "The HepatitisB Dose #1 Rule") elif self.hepatitisB == 1 and self.age >= 30: hepatitisB2Rule = clips.BuildRule("hepatitisB2-rule", "(immunizations (HepB ?x&:(= 1 ?x)) (age ?y&:(<= 30 ?y)))", "(assert (hepatitisB2))","The HepatitisB self.resultstxt += "<li>Needs Hepatitis B #2</li> " Dose #2 Rule") elif self.hepatitisB == 2 and self.age >= 120: hepatitisB3Rule = clips.BuildRule("hepatitisB3-rule", "(immunizations (HepB ?x&:(= 2 ?x)) (age ?y&:(<= 120 ?y)))", "(assert (hepatitisB3))","The HepatitisB self.resultstxt += "<li>Needs Hepatitis B #3</li> " Dose #3 Rule") tetra1Rule = clips.BuildRule("tetra1-rule", "(immunizations (tetra ?x&:(= 0 ?x)) (age ?y&:(<= 60 ?y)))", "(assert (tetra1))","The tetra Dose #1 Rule") Code in # tetravalent (DTP+Hib) tetra2Rule = clips.BuildRule("tetra2-rule", "(immunizations (tetra ?x&:(= 1 ?x)) (age ?y&:(<= 120 ?y)))", "(assert (tetra2))","The tetra Dose #2 Rule") if self.age >= 60: tetra3Rule = clips.BuildRule("tetra3-rule", "(immunizations (tetra ?x&:(= 2 ?x)) (age ?y&:(= 180 ?y)))", "(assert (tetra3))","The tetra Dose #3 Rule") if self.tetravalent == 0: polio1Rule = clips.BuildRule("polio1-rule", "(immunizations (polio ?x&:(= 0 ?x)) (age ?y&:(<= 60 ?y)))", "(assert (polio1))","The polio Dose #1 Rule") self.resultstxt += "<li>Needs Tetravalent (DTP+Hib) Dose #1</li> " polio2Rule = clips.BuildRule("polio2-rule", "(immunizations (polio ?x&:(= 1 ?x)) (age ?y&:(<= 120 ?y)))", "(assert (polio2))","The polio Dose #2 Rule") elif self.tetravalent == 1 and self.age >= 120: polio3Rule = clips.BuildRule("polio3-rule", "(immunizations (polio ?x&:(= 2 ?x)) (age ?y&:(= 180 ?y)))", "(assert (polio3))","The polio Dose #3 Rule") Boolean self.resultstxt += "<li>Needs Tetravalent (DTP+Hib) Dose #2</li> " rota1Rule = clips.BuildRule("rota1-rule", "(immunizations (rota ?x&:(= 0 ?x)) (age ?y&:(<= 60 ?y)))", "(assert (rota1))","The rotavirus Dose #1 Rule") elif self.tetravalent == 2 and self.age == 180: rota2Rule = clips.BuildRule("rota2-rule", "(immunizations (rota ?x&:(= 1 ?x)) (age ?y&:(<= 90 ?y)))", "(assert (rota2))","The rotavirus Dose #2 Rule") self.resultstxt += "<li>Needs Tetravalent (DTP+Hib) Dose #3</li> " # polio expressions if self.age >= 60: if self.polio == 0: Code in PyCLIPS self.resultstxt += "<li>Needs Polio Dose #1</li> " elif self.polio == 1 and self.age >= 120: self.resultstxt += "<li>Needs Polio Dose #2</li> " elif self.polio == 2 and self.age == 180: self.resultstxt += "<li>Needs Polio Dose #3</li> " # rotavirus if self.age >= 60: if self.rotavirus == 0: self.resultstxt += "<li>Needs Rotavirus Dose #1</li> " elif self.rotavirus == 1 and self.age >= 90: self.resultstxt += "<li>Needs Rotavirus Dose #2</li> " Visit us at http://www.mlhim.org