/******************************************************************************
   NAME:       clean_out_vhim4X_arms.sql
   PURPOSE:    This script will remove all records from the database
   ADDITIONAL INFORMATION:

    
   REVISIONS:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.1        05/07/2007  M. Jacobsen      - Initial Release
******************************************************************************/
-- Remove  entries from Common schema    
delete from TREATMENT_FACTOR;
    
-- Remove all entries from Allergies schema
delete from REACTION;
delete from DRUG_INGREDIENT;
delete from DRUG_CLASS;
delete from ALLERGY_COMMENT_EVENT;
delete from ALLERGY;
delete from ALLERGY_ASSESSMENT;

-- Remove all entries from Vitals schema
delete from NULLIFY_REASON;
delete from QUALIFIER;
delete from VITAL;

-- Remove all entries from Outpatient Pharmacy schema
delete from MEDICATION_INSTRUCTION;
delete from OUTPATIENT_MED_DSP;
delete from OUTPATIENT_MED_PRM;
delete from SPECIAL_DRUG_TRACKING;
delete from PHARMACY_REQUEST;

-- Remove common practpart records
delete from COMMENT_EVENT;

-- Remove all entries from Lab schema
delete from SPECIMEN;
delete from SPECIMEN_COLLECTION;
delete from CHEMISTRY_RESULT;
delete from LAB_TEST_REQ;
delete from LAB_TEST_PRM;

-- Remove common practpart records
delete from MEDICINE;
delete from PATIENT_VISIT;
delete from PATIENT_INFORMATION;
delete from PRACTITIONER_PARTICIPATION;
delete from PATIENT_INFORMATION;

commit;

