Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 5314

Show
Ignore:
Timestamp:
08/19/08 13:54:01 (3 months ago)
Author:
tmdugan
Message:

-- openmrs logic-api-refactoring

* added some logic tests and attempted to fix some broken ones

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/logic-api-refactoring/test/api/org/openmrs/test/logic/LogicBasicTest.java

    r4752 r5314  
    3535        protected void onSetUpInTransaction() throws Exception { 
    3636                initializeInMemoryDatabase(); 
    37                 //executeDataSet("org/openmrs/test/logic/include/LargeTestDatabase.xml"); 
    3837                executeDataSet("org/openmrs/test/logic/include/LogicTests-patients.xml"); 
    3938                 
     
    4241 
    4342        public void testCheckWhetherRecentResultsExist() throws Exception { 
    44                 executeDataSet("org/openmrs/test/logic/include/LogicBasicTest.concepts.xml"); 
    4543                                 
    4644                // Result = NO CD4 COUNT IN LAST 6 MONTHS 
     
    6058         */ 
    6159        public void testFilterByNumericResult() throws Exception { 
    62                 executeDataSet("org/openmrs/test/logic/include/LogicBasicTest.concepts.xml"); 
    6360                // Result = LAST CD4 COUNT < 350 
    6461                Patient patient = Context.getPatientService().getPatient(3); 
     
    7875         */ 
    7976        public void testFilterByNumericResultWithVoidedObs() throws Exception { 
    80                 executeDataSet("org/openmrs/test/logic/include/LogicBasicTest.concepts.xml"); 
    8177                // Result = LAST CD4 COUNT < 350 
    8278                Patient patient = Context.getPatientService().getPatient(2); 
     
    9086 
    9187        public void testFetchActiveMedications() throws Exception { 
    92                 executeDataSet("org/openmrs/test/logic/include/LogicBasicTest.concepts.xml"); 
    9388                // Result = ACTIVE MEDICATIONS 
    9489                Patient patient = Context.getPatientService().getPatient(2); 
     
    9994 
    10095        public void testFilterUsingComposition() throws Exception { 
    101                 executeDataSet("org/openmrs/test/logic/include/LogicBasicTest.concepts.xml"); 
    10296                // LAST CD4 COUNT < 350 AND NO ACTIVE MEDICATIONS 
    10397                Patient patient = Context.getPatientService().getPatient(2); 
  • openmrs/branches/logic-api-refactoring/test/api/org/openmrs/test/logic/LogicEvalTest.java

    r4752 r5314  
    3535                initializeInMemoryDatabase(); 
    3636                executeDataSet("org/openmrs/test/logic/include/LogicTests-patients.xml"); 
    37                  
     37                executeDataSet("org/openmrs/test/logic/include/LogicEvalTest.testSimpleLogic.xml"); 
    3838                authenticate(); 
    3939        } 
     
    4545         */ 
    4646        public void testSimpleLogic() throws Exception { 
    47                  
    48                 // add temperature as a concept in the database 
    49                 executeDataSet("org/openmrs/test/logic/include/LogicEvalTest.testSimpleLogic.xml"); 
    50                  
     47 
    5148                // RuleFactory needs to be cleaned up so that it picks up the new concepts 
    5249                 
  • openmrs/branches/logic-api-refactoring/test/api/org/openmrs/test/logic/LogicQueryParserTest.java

    r5167 r5314  
    7070 
    7171        } 
    72  
    73         @Override 
    74     public Boolean useInMemoryDatabase() { 
    75            return false; 
    76     } 
    77          
    7872         
    7973} 
  • openmrs/branches/logic-api-refactoring/test/api/org/openmrs/test/logic/include/LogicEvalTest.testSimpleLogic.xml

    r4752 r5314  
    11<?xml version='1.0' encoding='UTF-8'?> 
    22<dataset> 
    3   <concept concept_id="1" creator="1" date_created="2005-01-01 00:00:00.0" retired="false" is_set="false" class_id="1"/> 
    4   <concept_name concept_name_id="1" concept_id="1" name="TEMPERATURE (C)" locale="en" description="Temperature" creator="1" date_created="2005-01-01 00:00:00.0"/> 
    5   <concept_class concept_class_id="1" name="Finding" description="A medical discovery" creator="1" date_created="2005-01-01 00:00:00.0" retired="false"/> 
     3  <concept datatype_id="1" concept_id="1" creator="1" date_created="2005-01-01 00:00:00.0" retired="false" is_set="false" class_id="7"/> 
     4  <concept_name concept_name_id="3" concept_id="1" name="TEMPERATURE (C)" locale="en" description="Temperature" creator="1" date_created="2005-01-01 00:00:00.0"/> 
     5  <concept_numeric concept_id="1" units="IN" precise="false"/> 
    66</dataset> 
  • openmrs/branches/logic-api-refactoring/test/api/org/openmrs/test/logic/include/LogicTests-patients.xml

    r4752 r5314  
    1313  <patient_identifier_type patient_identifier_type_id="1" name="Test Identifier Type" description="Test description" check_digit="false" creator="1" date_created="2005-01-01 00:00:00.0" required="false" retired="false"/> 
    1414  <location location_id="1" name="Test Location" creator="1" date_created="2005-01-01 00:00:00.0" retired="false"/> 
     15 
     16  <concept_class concept_class_id="7" name="Question" description="Question (eg, patient history, SF36 items)" creator="1" date_created="2004-03-02 00:00:00.0" retired="false"/> 
     17  <concept_datatype concept_datatype_id="1" name="Numeric" hl7_abbreviation="NM" description="Numeric value, including integer or float (e.g., creatinine, weight)" creator="1" date_created="2004-02-02 00:00:00.0" retired="false"/> 
     18  <concept_datatype concept_datatype_id="2" name="Coded" hl7_abbreviation="CE" description="Coded value" creator="1" date_created="2004-02-02 00:00:00.0" retired="false"/> 
     19   
     20  <concept concept_id="5497" retired="false" datatype_id="1" class_id="7" is_set="false" creator="1" date_created="2004-08-12 00:00:00.0" version="0.1" changed_by="1" date_changed="2006-06-09 14:57:33.0"/> 
     21  <concept_name concept_name_id="1" concept_id="5497" name="CD4 COUNT" description="Measure of CD4 (T-helper cells) in blood" locale="en" creator="1" date_created="2004-08-12 00:00:00.0"/> 
     22  <concept_numeric concept_id="5497" hi_normal="1497.0" low_critical="99.0" low_normal="445.0" units="cells/L" precise="false"/> 
     23 
     24  <concept concept_id="1354" retired="false" datatype_id="1" class_id="7" is_set="false" creator="1" date_created="2007-11-06 11:02:43.0" version="1" changed_by="1" date_changed="2008-01-03 14:12:30.0"/> 
     25  <concept_name concept_name_id="2" concept_id="1354" name="WEIGHT (KG)" short_name="" description="" locale="en" creator="1" date_created="2007-11-06 11:02:43.0"/> 
     26  <concept_numeric concept_id="1354"  precise="false"/> 
     27   
     28  <concept concept_id="1355" retired="false" datatype_id="2" class_id="7" is_set="false" creator="1" date_created="2007-11-06 11:02:43.0" version="1" changed_by="1" date_changed="2008-01-03 14:12:30.0"/> 
     29  <concept_name concept_name_id="4" concept_id="1355" name="CURRENT ANTIRETROVIRAL DRUGS USED FOR TREATMENT" short_name="" description="" locale="en" creator="1" date_created="2007-11-06 11:02:43.0"/> 
    1530</dataset>