Cabeçalho da Solicitação
A tabela GAI faz parte do sistema ERP Protheus da TOTVS e é utilizada para cabeçalho da solicitação.
Ela pertence ao dicionário de dados do Protheus (SX2) e armazena informações essenciais utilizadas em processos como cadastros, movimentações e integrações do sistema.
A tabela GAI possui diversos campos (SX3), cada um com regras específicas como tipo, tamanho e validações, além de índices (SIX) que otimizam a performance das consultas.
Nesta página você pode consultar a estrutura completa da tabela GAI, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | GAI |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | GAI990 |
| X2_NOME | Cabeçalho da Solicitação |
| X2_NOMESPA | Encabezado de la Solicitud |
| X2_NOMEENG | Request Header |
| X2_ROTINA | - |
| X2_MODO | E |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | GAI_FILIAL+GAI_SOLICI |
| X2_PYME | N |
| X2_MODULO | 51 |
| X2_DISPLAY | - |
| X2_SYSOBJ | - |
| X2_USROBJ | - |
| X2_POSLGT | 1 |
| X2_CLOB | 2 |
| X2_AUTREC | 2 |
| X2_TAMFIL | 2 |
| X2_TAMUN | 0 |
| X2_TAMEMP | 0 |
| X2_STAMP | 2 |
| X2_INSDT | 2 |
| D_E_L_E_T_ | - |
| R_E_C_N_O_ | 4803 |
| R_E_C_D_E_L_ | 0 |
| X3_ARQUIVO | X3_ORDEM | X3_CAMPO | X3_TIPO | X3_TAMANHO | X3_DECIMAL | X3_TITULO | X3_TITSPA | X3_TITENG | X3_DESCRIC | X3_DESCSPA | X3_DESCENG | X3_PICTURE | X3_VALID | X3_USADO | X3_RELACAO | X3_F3 | X3_NIVEL | X3_RESERV | X3_CHECK | X3_TRIGGER | X3_PROPRI | X3_BROWSE | X3_VISUAL | X3_CONTEXT | X3_OBRIGAT | X3_VLDUSER | X3_CBOX | X3_CBOXSPA | X3_CBOXENG | X3_PICTVAR | X3_WHEN | X3_INIBRW | X3_GRPSXG | X3_FOLDER | X3_PYME | X3_CONDSQL | X3_CHKSQL | X3_IDXSRV | X3_ORTOGRA | X3_IDXFLD | X3_TELA | X3_PICBRV | X3_AGRUP | X3_POSLGT | X3_MODAL | X3_CHKSUM | X3_ADDSUM | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GAI | 01 | GAI_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial | Sucursal | Branch | - | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | V | - | - | - | - | - | - | - | - | - | 033 | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77492 | 0 |
| GAI | 02 | GAI_SOLICI | C | 6 | 0 | Nro Solicit | Num Solicit | Req. No. | Numero da Solicitacao | Numero de la Solicitud | Request number | @! | - | x x x x x x x x x x x x x x x x | IIf(Inclui,GetSXENum("GAI","GAI_SOLICI"),GAI->GAI_SOLICI) | - | 1 | xxxxxxxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77493 | 0 |
| GAI | 03 | GAI_REQUIS | C | 1 | 0 | Requisita p/ | Solicita pa/ | Request for | Requisitar para : | Solicitar para: | Request for | @! | HS_VldM04() | x x x x x x x x x x x x x x x x | "1" | - | 1 | xxxxxxxx | - | - | - | S | A | R | - | - | 1=Paciente;2=Consumo Proprio;3=Transferencia | 1=Paciente;2=Consumo Proprio;3=Transferencia | 1=Patient;2=Own consumption;3=Transfer | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77494 | 0 |
| GAI | 04 | GAI_REGATE | C | 6 | 0 | Reg.Atendi. | Reg.Atencion | Serv.Rec. | Registro de Atendimento | Registro de Atencion | Service Record | @! | HS_VldM04() | x x x x x x x x x x x x x x x x | - | GAV002 | 1 | xxxxxx x | - | - | - | S | A | R | - | - | - | - | - | - | HS_GFRequi(M->GAI_REQUIS, "GAI_REGATE") | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77495 | 0 |
| GAI | 05 | GAI_NOMPAC | C | 30 | 0 | Nome Pacient | Nomb.Pacient | Patien.Name | Nome do Paciente | Nombre del Paciente | Patient Name | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77496 | 0 |
| GAI | 06 | GAI_CODLOC | C | 2 | 0 | Setor | Sector | Sector | Codigo do setor | Codigo del sector | Sector Code | @! | HS_VldM04() | x x x x x x x x x x x x x x x x | - | GCS | 1 | xxxxxx x | - | - | - | S | A | R | - | - | - | - | - | - | HS_GFRequi(M->GAI_REQUIS, "GAI_CODLOC") | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77497 | 0 |
| GAI | 07 | GAI_NOMLOC | C | 30 | 0 | Descricao | Descripcion | Description | Descricao do setor | Descripcion del sector | Description of sector | @! | - | x x x x x x x x x x x x x x x x | IIf(!Inclui,Posicione("GCS",1,xFilial("GCS")+GAI->GAI_CODLOC,"GCS_NOMLOC"),"") | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione('GCS',1,xFilial('GCS')+GAI_CODLOC,'GCS_NOMLOC') | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77498 | 0 |
| GAI | 08 | GAI_ALMORI | C | 2 | 0 | Almox.Origem | Depos.Origen | Sour.Wareh. | Cod Almoxarifado Origem | Codigo Deposito Origen | Source Warehouse Code | @! | HS_VldM04() | x x x x x x x x x x x x x x x x | - | AL | 1 | xxxxxxxx | - | - | - | S | A | R | - | - | - | - | - | - | HS_GFRequi(M->GAI_REQUIS, "GAI_ALMORI") | - | 024 | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77499 | 0 |
| GAI | 09 | GAI_DSALMO | C | 30 | 0 | Descricao | Descripcion | Description | Descricao | Descripcion | Description | @! | - | x x x x x x x x x x x x x x x x | IF(!INCLUI,POSICIONE("SX5",1,XFILIAL("SX5")+"AL" + GAI->GAI_ALMORI,"X5_DESCRI"),"") | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE('SX5',1,XFILIAL('SX5')+'AL' + GAI->GAI_ALMORI,'X5_DESCRI') | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77500 | 0 |
| GAI | 10 | GAI_ALMSOL | C | 2 | 0 | Almox.Solic. | Depos.Solic. | Req.Warehous | Almoxarifado Solicitante | Deposito Solicitante | Requesting Warehouse | @! | HS_VldM04() | x x x x x x x x x x x x x x x x | - | AL | 1 | xxxxxxxx | - | - | - | S | A | R | - | - | - | - | - | - | HS_GFRequi(M->GAI_REQUIS, "GAI_ALMSOL") | - | 024 | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77501 | 0 |
| GAI | 11 | GAI_DSASOL | C | 30 | 0 | Descricao | Descripcion | Description | Descricao | Descripcion | Description | @! | - | x x x x x x x x x x x x x x x x | IF(!INCLUI,POSICIONE("SX5",1,XFILIAL("SX5")+"AL" + GAI->GAI_ALMSOL,"X5_DESCRI"),"") | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE('SX5',1,XFILIAL('SX5')+'AL' + GAI->GAI_ALMSOL,'X5_DESCRI') | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77502 | 0 |
| GAI | 12 | GAI_DATSOL | D | 8 | 0 | Dt Solicitac | Fch.Solicit. | Req. Date | Data da Solicitacao | Fecha de la Solicitud | Request date | @D | - | x x x x x x x x x x x x x x x x | dDataBase | - | 1 | xxxxxxxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77503 | 0 |
| GAI | 13 | GAI_URGENC | C | 1 | 0 | Urgente | Urgente | Urgent | Solicitacäo urgente | Solicitud Urgente | Urgent request | @! | - | x x x x x x x x x x x x x x x x | "0" | - | 1 | xxxxxx x | - | - | - | N | A | R | - | - | 0=Nao;1=Sim | 0=No;1=Si | 0=No;1=Yes | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77504 | 0 |
| GAI | 14 | GAI_HORSOL | C | 5 | 0 | Hr Solicitac | Hr Solicitud | Reqs. Time | Hora da Solicitacao | Hora de la Solicitud | Request time | 99:99 | - | x x x x x x x x x x x x x x x x | Time() | - | 1 | xxxxxxxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77505 | 0 |
| GAI | 15 | GAI_CRMPRE | C | 7 | 0 | Medico Presc | Medico Presc | Prescr. Phys | Medico da Prescricao | Medico de Prescripcion | Prescribing Physician | @! | HS_VldM04() | x x x x x x x x x x x x x x x x | HS_INIM04('GAI_CRMPRE') | MED | 1 | xxxxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77506 | 0 |
| GAI | 16 | GAI_CRMDES | C | 50 | 0 | Nome Medico | Nomb Medico | Doctor Name | Nome do Medico da prescri | Nomb del Med de la prescr | Presc. Doctor Name | @! | - | x x x x x x x x x x x x x x x x | HS_INIM04('GAI_CRMDES') | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | HS_INIPADR('SRA', 11, GAI->GAI_CRMPRE, 'RA_NOME') | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77507 | 0 |
| GAI | 17 | GAI_USUDIS | C | 15 | 0 | Resp Dispens | Resp Dispens | Resp.Disch. | Responsavel pela Dispensa | Responsable por dispensa | Person Resp.for Discharge | @! | - | x x x x x x x x x x x x x x x | - | US3 | 1 | - | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77508 | 0 |
| GAI | 18 | GAI_USUCON | C | 15 | 0 | Resp Confere | Resp Confere | Check Resp. | Responsavel Conferencia | Responsable Conferencia | Person Respons.for Check. | @! | - | x x x x x x x x x x x x x x x | - | US3 | 1 | - | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77509 | 0 |
| GAI | 19 | GAI_QATEND | N | 11 | 4 | Quantidade | Cantidad | Quantity | Quantidade | Cantidad | Quantity | @E 999,999.9999 | HS_VldM05() | x x x x x x x x x x x x x x x | 1 | - | 1 | - | - | - | - | N | A | V | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77510 | 0 |
| GAI | 20 | GAI_CBMATM | C | 17 | 0 | Cod.Bar.MatM | Cod.Bar.MatM | RegM Bar.Cod | Codigo de barras Mat/Med | Codigo de barras Mat/Med | Reg/Med Bar Code | @! | Vazio() .Or. IIf(Type('cCodLoc_Far')<>'U', HS_VCODBAR(M->GAI_CBMATM, 'GAJ_PROSOL',,.F., CCODLOC_FAR, .F.), HS_VLDCBMM()) | x x x x x x x x x x x x x x x | - | HSP001 | 1 | - | - | - | - | N | A | V | - | - | - | - | - | - | - | Posicione('GF2',1,xFilial('GF2')+GAI->GAI_CODENC,'GF2_DESENC') | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77511 | 0 |
| GAI | 21 | GAI_INDCBL | C | 1 | 0 | Pesq CB Lote | Bus CB Lote | Lot BC Serch | Pesq codigo barras lote | Bus. codigo barras lote | Lot Bar Code Search | @! | Pertence("123456") | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | V | - | - | #HS_IndSB8() | #HS_IndSB8() | #HS_IndSB8() | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77512 | 0 |
| GAI | 22 | GAI_CBLOTE | C | 54 | 0 | Cod.Bar.Lote | Cod.Bar.Lote | Lot Bar.Cod. | Codigo de barras Lote | Codigo de barras Lote | Lot Bar Code | @! | Vazio() .Or. HS_VCODBAR(M->GAI_CBLOTE, "GAJ_PROSOL",,.F., CCODLOC_FAR, .T.) | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | V | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77513 | 0 |
| GAI | 23 | GAI_FLGATE | C | 1 | 0 | Flag Atendto | Flag Atenc. | Attend. Flag | Flag Atendimento | Flag Atencion | Attendance flag | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | V | R | - | - | 0=Nao atendida;1=Atendimento parcial;2=Atendimento total;3=Atendimento parcial fechado;4=Encerrado | 0=No atendida;1=Atencion parcial;2=Atencion total;3=Atencion parcial finalizado;4=Finalizado | 0=Not attended;1=Partial attendance;2=Total attendance;3=Partial Attendance closed;4=Closed | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77514 | 0 |
| GAI | 24 | GAI_CODENC | C | 6 | 0 | Motivo Encer | Mot. cierre | Reason Clos | codigo motivo encerrament | codigo motivo cierre | Code Reason for Closure | @! | HS_SeekRet("GF2","M->GAI_CODENC",1,.F.,"GAI_DESENC","GF2_DESENC",,,.T.) | x x x x x x x x x x x x x x x x x | - | GF2 | 1 | xxxxxx x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77515 | 0 |
| GAI | 25 | GAI_DESENC | C | 40 | 0 | Descr.Motivo | Descr.Motivo | Reas. Descr. | descricao motivo encerram | descripc. motivo finaliz. | Conclusion Reason Descr. | @! | - | x x x x x x x x x x x x x x x x | IIf(!Inclui,Posicione("GF2",1,xFilial("GF2")+GAI->GAI_CODENC,"GF2_DESENC"),"") | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione('GF2',1,xFilial('GF2')+GAI->GAI_CODENC,'GF2_DESENC') | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77516 | 0 |
| GAI | 26 | GAI_LOGARQ | C | 40 | 0 | Log do Arq | Log del Arch | File Log | Log do Arq | Log del Archivo | File Log | @! | - | x x x x x x x x x x x x x x x | HS_LOGARQ() | - | 1 | - | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77517 | 0 |
| GAI | 27 | GAI_CDLOCT | C | 2 | 0 | Setor Trans. | Sector Trans | Transf.Sect. | Setor Orig. Transferencia | Sector Orig. Transferenc. | Transfer Source Sector | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77518 | 0 |
| GAI | 28 | GAI_ALMORT | C | 2 | 0 | Alm.Transf. | Dep.Transf. | Tranf.Store | Almox. Orig. Transferenc. | Depos. Orig. Transferenc. | Transfer Source Storage | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77519 | 0 |
| GAI | 29 | GAI_LOGTRA | C | 40 | 0 | Log Transfe. | Log Transf. | Transf.Log | Log da Transferencia | Log de la Transferencia | Transfer Log | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77520 | 0 |
| GAI | 30 | GAI_IDMARC | C | 2 | 0 | Marcador | Marcador | Marker | Marcador | Marcador | Marker | @BMP | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77521 | 0 |
| GAI | 31 | GAI_QUARTO | C | 4 | 0 | Quarto | Habitacion | Bed | Quarto | Habitacion | Bed | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77522 | 0 |
| GAI | 32 | GAI_LEITO | C | 4 | 0 | Leito | Cama | Bed | Leito | Cama | Bed | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77523 | 0 |
| GAI | 33 | GAI_BARKIT | C | 17 | 0 | Cod.Bar.Kit | Cod Bar Kit | Kit barcode | Codigo de Barras Kit | Codigo de Barras Kit | Kit barcode | @! | HS_BARKIT() | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | A | V | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77524 | 0 |
| GAI | 34 | GAI_RESERV | C | 1 | 0 | Reservado | Reservado | Reserved | Reservado RN | Reservado RN | Reserved RN | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77525 | 0 |
| GAI | 35 | GAI_CODAGE | C | 6 | 0 | Cod. Agenda | Cod. Agenda | ScheduleCode | Codigo da agenda | Codigo de la agenda | Code of Schedule | 999999 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77526 | 0 |
| INDICE | ORDEM | CHAVE | DESCRICAO | DESCSPA | DESCENG | PROPRI | F3 | NICKNAME | SHOWPESQ | IX_VIRTUAL | IX_VIRCUST | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GAI | 1 | GAI_FILIAL+GAI_SOLICI | Nro Solicit | Num Solicit | Req. No. | S | - | - | S | 2 | 3 | - | 11368 | 0 |
| GAI | 2 | GAI_FILIAL+GAI_REGATE+DTOS(GAI_DATSOL) | Reg.Atendi. + Dt Solicitac | Reg.Atencion + Fch.Solicit. | Serv.Rec. + Req. Date | S | - | - | S | 2 | 3 | - | 11369 | 0 |
| GAI | 3 | GAI_FILIAL+GAI_CODLOC+DTOS(GAI_DATSOL) | Setor + Dt Solicitac | Sector + Fch.Solicit. | Sector + Req. Date | S | - | - | S | 2 | 3 | - | 11370 | 0 |
| GAI | 4 | GAI_FILIAL+DTOS(GAI_DATSOL) | Dt Solicitac | Fch.Solicit. | Req. Date | S | - | - | S | 2 | 3 | - | 11371 | 0 |
| GAI | 5 | GAI_FILIAL+GAI_ALMORI | Almox.Origem | Depos.Origen | Sour.Wareh. | S | - | - | S | 2 | 3 | - | 11372 | 0 |
| GAI | 6 | GAI_FILIAL+GAI_NOMPAC | Nome Pacient | Nomb.Pacient | Patien.Name | S | - | - | S | 2 | 3 | - | 11373 | 0 |
| GAI | 7 | GAI_FILIAL+GAI_CODENC | Motivo Encer | Mot. cierre | Reason Clos | S | - | - | S | 2 | 3 | - | 11374 | 0 |
| GAI | 8 | GAI_FILIAL+GAI_CRMPRE+GAI_SOLICI | Medico Presc + Nro Solicit | Medico Presc + Num Solicit | Prescr. Phys + Req. No. | S | - | - | S | 2 | 3 | - | 11375 | 0 |
Ela é utilizada para cabeçalho da solicitação dentro do sistema ERP Protheus.
Nesta página você pode visualizar todos os campos, incluindo tipo, tamanho e validações.
Os índices são estruturas que melhoram a performance de busca e acesso aos dados dentro do Protheus.