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

    
   REVISIONS:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.1        07/17/2006  M. Jacobsen      - Initial Release
******************************************************************************/
-- Remove all entries from Common schema
delete from ALLERGY_PRACT_PARTICIPATION;
delete from ALLERGY_PRACT_PARTICIPATION_JN;
delete from VITAL_PRACT_PARTICIPATION;
delete from VITAL_PRACT_PARTICIPATION_JN;
delete from VITAL_DEVICE;
delete from VITAL_DEVICE_JN;
delete from DEVICE;
delete from DEVICE_JN;
    
-- Remove all entries from Allergies schema
delete from REACTION_ONSET_HIST;
delete from REACTION_ONSET_HIST_JN;
delete from REACTION;
delete from REACTION_JN;
delete from SEVERITY_HIST;
delete from SEVERITY_HIST_JN;
delete from ALLERGY_STATUS_HIST;
delete from ALLERGY_STATUS_HIST_JN;
delete from ALLERGY;
delete from ALLERGY_JN;
delete from SEVERITY;
delete from SEVERITY_JN;

-- Remove all entries from Vitals schema
delete from BODY_SITE;
delete from OBSERVATION_METHOD;
delete from PATIENT_STATE;
delete from VITAL;
delete from BODY_SITE_JN;
delete from OBSERVATION_METHOD_JN;
delete from PATIENT_STATE_JN;
delete from VITAL_JN;

-- Remove common practpart records
delete from PRACTITIONER_PARTICIPATION;
delete from PRACTITIONER_PARTICIPATION_JN;

-- The resets of sequences need specific username/passwords
-- Therefore the sequence resets are called from the build.xml
-- file in the same directory as this script passing in
-- specific credentials

commit;

