GPBR_CAT_VW(SQL View) |
Index Back |
---|---|
Labor Event - Accident at WorkeSocial XML Framework View Table This record is used to generate informations for eSocial layout S-2210 - Labor Event - Accident at Work Communication (CAT) |
SELECT B.GPBR_DRIVER_SEQ , B.GPBR_DRV_SPLIT_SEQ , B.COMPANY , B.GPBR_EVENT_CD , A.GPBR_TP_ENV , CASE WHEN ( SELECT C.GPBR_VERSION FROM %Table(GPBR_EVNT_SETUP) C WHERE C.GPBR_EVENT_CD = B.GPBR_EVENT_CD AND %EffdtCheck(GPBR_EVNT_SETUP C1, C, %CurrentDateIn)) IS NOT NULL THEN ( SELECT C.GPBR_VERSION FROM %Table(GPBR_EVNT_SETUP) C WHERE C.GPBR_EVENT_CD = B.GPBR_EVENT_CD AND %EffdtCheck(GPBR_EVNT_SETUP C1, C, %CurrentDateIn)) ELSE ' ' END , A.GPBR_ISSUER , B.GPBR_ACTION , A.GPBR_COMP_INS_TYPE , A.ESTAB_ID_BRA , B.GPBR_EVENT_ID , A.GPBR_RECT , CASE WHEN ( SELECT E.GPBR_RECEIPT_NUM FROM %Table(GPBR_DRVEMP_XRF) D , %Table(GPBR_DRIVER_DAT) E WHERE D.GPBR_DRIVER_SEQ = A.GPBR_DRIVER_SEQ AND E.GPBR_DRIVER_SEQ = D.GPBR_PRE_DRV_SEQ) IS NOT NULL THEN ( SELECT E.GPBR_RECEIPT_NUM FROM %Table(GPBR_DRVEMP_XRF) D , %Table(GPBR_DRIVER_DAT) E WHERE D.GPBR_DRIVER_SEQ = A.GPBR_DRIVER_SEQ AND E.GPBR_DRIVER_SEQ = D.GPBR_PRE_DRV_SEQ) ELSE ' ' END , A.GPBR_CAT_REG , A.GPBR_COM_INS_TYPEE , A.GPBR_ESTAB_ID_EST , A.NATIONAL_ID , A.GPBR_NAT_ID , A.INCIDENT_DT , A.GPBR_CAT_TYPE , A.CAT_WORKED_HR_BRA , A.GPBR_HRACCID_CAT , A.GPBR_CAT_WORKED_HR , A.CAT_TYPE_BRA , A.CAT_DEATH_BRA , A.CAT_POLICE_REG_BRA , A.INJURY_NAT_CD_BRA , A.GPBR_CAT_INI , A.GPBR_CAT_OBS , A.CAT_LOCTYPE_BRA , A.GPBR_ADDR , A.GPBR_ADDR2 , A.GPBR_NUM , CASE WHEN A.CAT_LOCTYPE_BRA = '2' THEN 0 ELSE A.GPBR_CODE_CITY END, CASE WHEN A.CAT_LOCTYPE_BRA = '2' THEN ' ' ELSE A.GPBR_STATE END, A.GPBR_TAKER_INSCR , A.TREATMENT_DT , A.GPBR_TREATMENT_TM , A.GPBR_HOSP_IND , A.GPBR_HOSP_DUR , A.GPBR_LEAVE_IND , A.GPBR_DESC_INJURY , A.GPBR_DIAGNOS , A.GPBR_CID_CODE , A.NAME_FORMAL , A.GPBR_PERS_NAME , A.GPBR_MED_TYPE , A.MED_CRM_BRA , A.GPBR_STATE_OC , A.CAT_REG_DT_BRA , A.GPBR_CAT_REG_ID , A.GPBR_REG_ESOCIAL , A.GPBR_COD_CATEG , A.GPBR_WPLACE_CD , A.DT_OF_DEATH , A.ADDR_FIELD2 , A.GPBR_COMPL , A.GPBR_COUNTY , A.POSTAL , CASE WHEN A.CAT_LOCTYPE_BRA = '2' THEN A.COUNTRY ELSE ' ' END, CASE WHEN A.CAT_LOCTYPE_BRA = '2' THEN A.POSTAL_OTHER ELSE ' ' END, A.CNES_BRA, A.CAT_WORK_DATE_BRA, A.ABSENCE_IND_BRA, A.GPBR_COMMENTS , A.COMMENTS, A.CAT_INC_TYPE_BRA, A.CAT_SPEC_LOC_BRA FROM %Table(GPBR_STG_CAT) A ,%Table(GPBR_DRIVER_DAT) B WHERE A.GPBR_DRIVER_SEQ = B.GPBR_DRIVER_SEQ AND A.GPBR_DRV_SPLIT_SEQ = B.GPBR_DRV_SPLIT_SEQ AND B.GPBR_STATUS = 'XRDY' |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | Number(30,0) | DECIMAL(30) NOT NULL | Driver Sequence | |
2 | Number(20,0) | DECIMAL(20) NOT NULL | eSocial - Split Sequence | |
3 | COMPANY | Character(3) | VARCHAR2(3) NOT NULL | Company |
4 | GPBR_EVENT_CD | Character(6) | VARCHAR2(6) NOT NULL | eSocial - Event Code |
5 | GPBR_TP_ENV | Character(1) | VARCHAR2(1) NOT NULL | eSocial Environment Identification |
6 | GPBR_VERSION | Character(9) | VARCHAR2(9) NOT NULL | eSocial version |
7 | GPBR_ISSUER | Number(1,0) | SMALLINT NOT NULL | eSocial Issuer |
8 | GPBR_ACTION | Character(3) | VARCHAR2(3) NOT NULL |
eSocial Action
ADD=Row Inserted COR=Row Correction DEL=Row Deleted UPD=Row Updated |
9 | GPBR_COMP_INS_TYPE | Character(1) | VARCHAR2(1) NOT NULL | eSocial Company Inscription Type |
10 | ESTAB_ID_BRA | Character(20) | VARCHAR2(20) NOT NULL | Establishment ID Brazil |
11 | GPBR_EVENT_ID | Character(40) | VARCHAR2(40) NOT NULL | eSocial - Generate ID Number Governant |
12 | GPBR_RECT | Number(30,0) | DECIMAL(30) NOT NULL | eSocial Ind Calculation |
13 | GPBR_RECEIPT_NUM | Character(40) | VARCHAR2(40) NOT NULL | Receipt Num |
14 | GPBR_CAT_REG | Number(2,0) | SMALLINT NOT NULL | CAT Register |
15 | GPBR_COM_INS_TYPEE | Character(2) | VARCHAR2(2) NOT NULL | Company Inscription Type |
16 | GPBR_ESTAB_ID_EST | Character(20) | VARCHAR2(20) NOT NULL | Establishment ID |
17 | NATIONAL_ID | Character(20) | VARCHAR2(20) NOT NULL | National ID |
18 | GPBR_NAT_ID | Character(11) | VARCHAR2(11) NOT NULL | eSocial National ID Number |
19 | INCIDENT_DT | Date(10) | DATE | Incident Date |
20 | GPBR_CAT_TYPE | Character(6) | VARCHAR2(6) NOT NULL | CAT Type |
21 | CAT_WORKED_HR_BRA | Number(5,2) | DECIMAL(4,2) NOT NULL | Worked Hours |
22 | GPBR_HRACCID_CAT | Character(4) | VARCHAR2(4) NOT NULL | Accident Time in string format 4 characters HHMI |
23 | GPBR_CAT_WORKED_HR | Character(4) | VARCHAR2(4) NOT NULL | CAT Worked Hours Before |
24 | CAT_TYPE_BRA | Character(1) | VARCHAR2(1) NOT NULL |
CAT Type
1=Initial 2=Reopened 3=Death Communication |
25 | CAT_DEATH_BRA | Character(1) | VARCHAR2(1) NOT NULL | CAT Death |
26 | CAT_POLICE_REG_BRA | Character(1) | VARCHAR2(1) NOT NULL | Police Register for Brazil (CAT) |
27 | INJURY_NAT_CD_BRA | Number(9,0) | DECIMAL(9) NOT NULL | Nature of Injury Legal Code |
28 | GPBR_CAT_INI | Number(1,0) | SMALLINT NOT NULL | Initial CAT |
29 | GPBR_CAT_OBS | Character(254) | VARCHAR2(254) NOT NULL | Observations CAT |
30 | CAT_LOCTYPE_BRA | Character(1) | VARCHAR2(1) NOT NULL |
CAT Location Type
1=Employer Establishment 2=Employee Service Taker 3=Public Thoroughfare 4=Rural Area 5=Other 6=Establishment Outside Brazil |
31 | GPBR_ADDR | Character(80) | VARCHAR2(80) NOT NULL | Address |
32 | GPBR_ADDR2 | Character(80) | VARCHAR2(80) NOT NULL | Place |
33 | GPBR_NUM | Character(10) | VARCHAR2(10) NOT NULL | Num |
34 | GPBR_CODE_CITY | Number(7,0) | INTEGER NOT NULL | City Code |
35 | GPBR_STATE | Character(2) | VARCHAR2(2) NOT NULL | State Code |
36 | GPBR_TAKER_INSCR | Character(14) | VARCHAR2(14) NOT NULL | Service Taker Inscription |
37 | TREATMENT_DT | Date(10) | DATE | Treatment Date |
38 | GPBR_TREATMENT_TM | Character(4) | VARCHAR2(4) NOT NULL | Treatment Time |
39 | GPBR_HOSP_IND | Character(1) | VARCHAR2(1) NOT NULL | Hospital Ind |
40 | GPBR_HOSP_DUR | Number(4,0) | SMALLINT NOT NULL | Hospital Duration |
41 | GPBR_LEAVE_IND | Character(1) | VARCHAR2(1) NOT NULL | Leave Ind |
42 | GPBR_DESC_INJURY | Number(9,0) | DECIMAL(9) NOT NULL | Injury Description |
43 | GPBR_DIAGNOS | Character(100) | VARCHAR2(100) NOT NULL | Diagnostic |
44 | GPBR_CID_CODE | Character(5) | VARCHAR2(5) NOT NULL | CID Code |
45 | NAME_FORMAL | Character(60) | VARCHAR2(60) NOT NULL | Formal Name - name formatted for Formal Display by COuntry. Normally used in Correspondence. |
46 | GPBR_PERS_NAME | Character(70) | VARCHAR2(70) NOT NULL | Used to keep a person name. |
47 | GPBR_MED_TYPE | Number(1,0) | SMALLINT NOT NULL | Medical Type |
48 | MED_CRM_BRA | Character(15) | VARCHAR2(15) NOT NULL | Medical Certication Register. |
49 | GPBR_STATE_OC | Character(2) | VARCHAR2(2) NOT NULL | OC State |
50 | CAT_REG_DT_BRA | Date(10) | DATE | CAT Register Date |
51 | GPBR_CAT_REG_ID | Character(40) | VARCHAR2(40) NOT NULL | CAT Origin |
52 | GPBR_REG_ESOCIAL | Character(30) | VARCHAR2(30) NOT NULL | eSocial eSocial Register |
53 | GPBR_COD_CATEG | Number(3,0) | SMALLINT NOT NULL | Category Code |
54 | GPBR_WPLACE_CD | Character(30) | VARCHAR2(30) NOT NULL | Work Environment Code BRA. |
55 | DT_OF_DEATH | Date(10) | DATE | Date of Death |
56 | ADDR_FIELD2 | Character(4) | VARCHAR2(4) NOT NULL | Address Field 2 |
57 | GPBR_COMPL | Character(30) | VARCHAR2(30) NOT NULL | Complement |
58 | GPBR_COUNTY | Character(60) | VARCHAR2(60) NOT NULL | County |
59 | POSTAL | Character(12) | VARCHAR2(12) NOT NULL | Postal |
60 | COUNTRY | Character(3) | VARCHAR2(3) NOT NULL | Country |
61 | POSTAL_OTHER | Character(12) | VARCHAR2(12) NOT NULL | Postal Other |
62 | CNES_BRA | Character(7) | VARCHAR2(7) NOT NULL | CNES Id |
63 | CAT_WORK_DATE_BRA | Date(10) | DATE | Last Work Date |
64 | ABSENCE_IND_BRA | Character(1) | VARCHAR2(1) NOT NULL |
Absence Indicator
N=No Y=Yes |
65 | GPBR_COMMENTS | Long Character | CLOB | Comments. |
66 | COMMENTS | Long Character | CLOB | Comment |
67 | CAT_INC_TYPE_BRA | Character(1) | VARCHAR2(1) NOT NULL |
CAT Incident Type
1=Typical 2=Illness 3=Route |
68 | CAT_SPEC_LOC_BRA | Long Character | CLOB | CAT Specific Location |