View slot9.WORLD.TSTA.TDEX_RMS_VICTIM_VW
Legend:
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
HEADER char 2  √  null
ACTION varchar2 0  √  null
LABEL varchar2 0  √  null
UPDATE_DATE date 7  √  null
UPDATE_TIME varchar2 4  √  null
AGENCY varchar2 9  √  null
INCIDENT_NUMBER varchar2 20
VICTIM_UNIQUE_ID number 0
LAST_NAME varchar2 100  √  null
FIRST_NAME varchar2 80  √  null
MIDDLE_NAME varchar2 80  √  null
SUFFIX_NAME varchar2 30  √  null
DATE_OF_BIRTH date 7  √  null
AGE number 0  √  null
GENDER varchar2 30
RACE varchar2 30
ETHNICITY varchar2 30  √  null
RESIDENT_STATUS varchar2 0  √  null
US_CITIZEN varchar2 0  √  null
PASSPORT_VISA_NUMBER varchar2 30  √  null
IMMIGRATION_DOCUMENT_NUMBER varchar2 0  √  null
COUNTRY_OF_BIRTH varchar2 0  √  null
DRIVERS_LICENSE_NUMBER varchar2 30  √  null
DRIVERS_LICENSE_STATE varchar2 30  √  null
DRIVERS_LICENSE_CLASS varchar2 30  √  null
HOME_ADDRESS varchar2 50  √  null
HOME_ADDRESS_CITY varchar2 40  √  null
HOME_ADDRESS_STATE varchar2 30  √  null
HOME_ADDRESS_ZIP_CODE varchar2 12  √  null
HOME_PHONE varchar2 12  √  null
CELL_PHONE varchar2 12  √  null
EMPLOYER_NAME varchar2 0  √  null
EMPLOYER_ADDRESS varchar2 0  √  null
EMPLOYER_ADDRESS_CITY varchar2 0  √  null
EMPLOYER_ADDRESS_STATE varchar2 0  √  null
EMPLOYER_ADDRESS_ZIP_CODE varchar2 0  √  null
WORK_PHONE varchar2 0  √  null
OCCUPATION varchar2 0  √  null
JUVENILE_INDICATOR varchar2 0  √  null
SUSPECTED_USING_ALCOHOL varchar2 0  √  null
SUSPECTED_USING_DRUGS varchar2 0  √  null
VICTIM_TYPE varchar2 30  √  null
AGGRAVATED_ASSAULT_HOMICIDE varchar2 0  √  null
JUSTIFIABLE_HOMICIDE varchar2 0  √  null
INJURY_TYPE varchar2 0  √  null
RELATIONSHIP_VICTIM_TO_SUSPECT varchar2 0  √  null
VICTIM_IS_COMPLAINANT varchar2 0  √  null
INJURY_DESCRIPTION varchar2 0  √  null
ORGANIZATION_NAME varchar2 0  √  null
ORGANIZATION_ADDRESS varchar2 0  √  null
ORGANIZATION_ADDRESS_CITY varchar2 0  √  null
ORGANIZATION_ADDRESS_STATE varchar2 0  √  null
ORGANIZATION_ADDRESS_ZIP_CODE varchar2 0  √  null
ORGANIZATION_PHONE varchar2 0  √  null
INCIDENT_SYSTEM_NUMBER number 0
SMT_DESCRIPTION varchar2 40  √  null

Analyzed at Mon Sep 20 21:05 MDT 2021

View Definition:
select distinct 'VI' HEADER, null ACTION, null LABEL, ip.updator_date UPDATE_DATE, to_char(ip.updator_date, 'HH24MI') UPDATE_TIME, ac.ori_number AGENCY, inc.inc_report_number INCIDENT_NUMBER, ip.per_person_id VICTIM_UNIQUE_ID, --Person id mn.lname LAST_NAME, mn.fname FIRST_NAME, mn.mname MIDDLE_NAME, mn.title_code SUFFIX_NAME, mn.dob DATE_OF_BIRTH, bdm_age(mn.dob, ip.updator_date) AGE, --Age as of UPDATE_DATE --p.sex_sex_code GENDER, --18230 --p.race_race_code RACE, --18230 --p.ethnicity_code ETHNICITY, --18230 mp.sex_code GENDER, --18230 mp.race_code RACE, --18230 mp.ethnicity_code ETHNICITY, --18230 null RESIDENT_STATUS, --Not in EJS RMS null US_CITIZEN, --Not in EJS RMS (select id_number from misc_ids where updator_date = (select max(updator_date) from misc_ids mi where per_person_id = p.person_id and misc_cd_misc_id_code = misc.misc_cd_misc_id_code) and rownum = 1) PASSPORT_VISA_NUMBER, null IMMIGRATION_DOCUMENT_NUMBER, --Not in EJS RMS null COUNTRY_OF_BIRTH, --Not in EJS RMS (select id_number from misc_ids where updator_date = (select max(updator_date) from misc_ids mi2 where per_person_id = p.person_id and misc_cd_misc_id_code = misc2.misc_cd_misc_id_code) and rownum = 1) DRIVERS_LICENSE_NUMBER, (select state_cd_state_code from misc_ids where updator_date = (select max(updator_date) from misc_ids mi2 where per_person_id = p.person_id and misc_cd_misc_id_code = misc2.misc_cd_misc_id_code) and rownum = 1) DRIVERS_LICENSE_STATE, (select misc_id_type from misc_ids where updator_date = (select max(updator_date) from misc_ids mi2 where per_person_id = p.person_id and misc_cd_misc_id_code = misc2.misc_cd_misc_id_code) and rownum = 1) DRIVERS_LICENSE_CLASS, (select substrb(ejs_addresses.full_street_summary(a1.address_id),1,50) from addresses a1 where a1.address_id = (select max(address_id) from person_addresses pa where pa.person_id = p.person_id and address_type_code = 'RES')) HOME_ADDRESS, (select city from addresses a1 where a1.address_id = (select max(address_id) from person_addresses pa where pa.person_id = p.person_id and address_type_code = 'RES')) HOME_ADDRESS_CITY, (select state_cd_state_code from addresses a1 where a1.address_id = (select max(address_id) from person_addresses pa where pa.person_id = p.person_id and address_type_code = 'RES')) HOME_ADDRESS_STATE, (select substrb(zip5 || '-' || zip4,1,12) from addresses a1 where a1.address_id = (select max(address_id) from person_addresses pa where pa.person_id = p.person_id and address_type_code = 'RES')) HOME_ADDRESS_ZIP_CODE, (select area || '-' || prefix || '-' || suffix from phones where phone_id = (select max(phone_id) from phones where per_person_id = p.person_id and pho_typ_cd_phone_type_code = pho.pho_typ_cd_phone_type_code)) HOME_PHONE, (select area || '-' || prefix || '-' || suffix from phones where phone_id = (select max(phone_id) from phones where per_person_id = p.person_id and pho_typ_cd_phone_type_code = pho2.pho_typ_cd_phone_type_code)) CELL_PHONE, null EMPLOYER_NAME, --Not in EJS RMS null EMPLOYER_ADDRESS, --Not in EJS RMS null EMPLOYER_ADDRESS_CITY, --Not in EJS RMS null EMPLOYER_ADDRESS_STATE, --Not in EJS RMS null EMPLOYER_ADDRESS_ZIP_CODE, --Not in EJS RMS null WORK_PHONE, --Not in EJS RMS null OCCUPATION, --Not in EJS RMS null JUVENILE_INDICATOR, --Use Age null SUSPECTED_USING_ALCOHOL, null SUSPECTED_USING_DRUGS, ip.victm_cd_victim_type_code VICTIM_TYPE, null AGGREAVATED_ASSAULT_HOMICIDE, null JUSTIFIABLE_HOMICIDE, null INJURY_TYPE, null RELATIONSHIP_VICTIM_TO_SUSPECT, null VICTIM_IS_COMPLAINANT, null INJURY_DESCRIPTION, null ORGANIZATION_NAME, null ORGANIZATION_ADDRESS, null ORGANIZATION_ADDRESS_CITY, null ORGANIZATION_ADDRESS_STATE, null ORGANIZATION_ADDRESS_ZIP_CODE, null ORGANIZATION_PHONE, inc.incident_id INCIDENT_SYSTEM_NUMBER, (select description from smts where smt_id = (select max(smt_id) from SMTS where per_person_id = p.person_id) and rownum = 1) SMT_DESCRIPTION from incident_people ip, incident_person_roles ipr, incidents inc, agency_codes ac, master_names mn, master_people mp, --18230 people p, misc_ids misc, misc_ids misc2, --person_addresses padd, --addresses addr, phones pho, phones pho2, smts smt, incident_supplements isup --where ip.role_role_type = 'V' --18230 where ipr.role_type = 'V' --18230 and ip.inc_per_id = ipr.inc_per_id --18230 and isup.inc_incident_id = ip.inc_incident_id and isup.supp_seq = ip.supp_seq and inc.incident_id = isup.inc_incident_id and isup.isc_status_code = 'A' and ac.agency_code = inc.agncy_cd_agency_code and mn.per_person_id = ip.per_person_id and mn.mn_id = ip.mn_mn_id and p.person_id = mn.per_person_id and p.master_person_id = mp.master_person_id --18230 and misc.per_person_id (+) = p.person_id and misc.misc_cd_misc_id_code (+) = 'PP' and misc2.per_person_id (+) = p.person_id and misc2.misc_cd_misc_id_code (+) = 'DL' --and padd.person_id (+) = p.person_id --and padd.address_type_code (+) = 'RES' --and addr.address_id = padd.address_id and pho.per_person_id (+) = p.person_id and pho.pho_typ_cd_phone_type_code (+) = 'RES' and pho2.per_person_id (+) = p.person_id and pho2.pho_typ_cd_phone_type_code (+) = 'CEL' and smt.per_person_id (+) = p.person_id
 
Possibly Referenced Tables/Views: