HCPATVISIT – Patient Visit

System
Inventory Control (IC)
Prefix
HPV
Primary key
COMPANY, VISIT-NBR
Fields
14
Updated by
225 programs
Referenced by
2 programs

HCPATVISIT is the Patient Visit table in Lawson Inventory Control (prefix HPV). It is indexed by COMPANY, VISIT-NBR (HPVSET1); alternate indexes: HPVSET2. It is related 1:1 to HCPATIENT and 1:M to HCPATCHRG. It is updated by AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 and 217 more and referenced by PC210 and PC530. The table has 14 fields, 2 indexes and 2 documented relations.

About HCPATVISIT

This is the Patient Visit information file.

Fields (14)

Column = COBOL field name without the HPV- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored. PK = primary key (present in every index); SETn = leading/alternate key of that index.

Field / columnTypeDescription & valuesUpdated by
#HPV-COMPANY PK
COMPANY
Numeric 4This field contains the company number.CX506, PC20.1, PC520, PC521
#HPV-VISIT-NBR PK
VISIT_NBR
Alpha 12This is the identifier that makes a visit unique with a company.CX506, PC20.1, PC520, PC521
#HPV-PATIENT-ID SET2
PATIENT_ID
Alpha 12This uniquely identifies a patient within a company.CX506, PC20.1, PC520, PC521
#HPV-PATIENT-CLASS
PATIENT_CLASS
Alpha 1This provides for a category of patient.
  • I Inpatient
  • O Outpatient
CX506, PC20.1, PC520, PC521
#HPV-ROOM
ROOM
Alpha 10This identifies the room the patient is in.PC20.1, PC520, PC521
#HPV-BED
BED
Numeric 2This field contains the patient's bed number.PC20.1, PC520, PC521
#HPV-ADMIT-DATE
ADMIT_DATE
Numeric 8 (yyyymmdd)The date the patient was admitted.PC20.1, PC520, PC521
#HPV-DISCH-DATE
DISCH_DATE
Numeric 8 (yyyymmdd)The discharge date of the patient.PC20.1, PC520, PC521
#HPV-LAST-TRANS-DT
LAST_TRANS_DT
Numeric 8 (yyyymmdd)This is the date of the last add/update to a charge for this visit.PC20.1, PC520
#HPV-DIAG-REL-GRP
DIAG_REL_GRP
Alpha 15This identifies the Diagnostic Related Group.PC20.1, PC520, PC521
#HPV-PRACTNR-ID
PRACTNR_ID
Alpha 15This field contains the practitioner ID.PC20.1, PC520, PC521
#HPV-SEC-PRACTNR-ID
SEC_PRACTNR_ID
Alpha 15This field contains a secondary practitioner ID.PC20.1, PC520
#HPV-LAST-CHRG-SEQ
LAST_CHRG_SEQ
Numeric 4The last charge sequence is used to determine the next available charge sequence to assign to a new charge for the visit.AP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +52 more (list truncated in source)
#HPV-UPDATE-DATE
UPDATE_DATE
Numeric 8 (yyyymmdd)This is the date of the last update to the visit record.CX506, PC20.1, PC520, PC521

Indexes (2)

Keys are listed in index order; ↓ marks a descending key. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
HPVSET1
  1. COMPANY
  2. VISIT-NBR
PrimaryAP125, AP126, AP131, AP20.1, AP20.2, AP20.3, AP20.4, AP20.5 +22 more (list truncated in source)
HPVSET2
  1. COMPANY
  2. PATIENT-ID
  3. VISIT-NBR
KeyChangePC20.2, PC310, PC521

Relations

Relationship map — 1:1 lookups/parents on the left, 1:M children on the right (up to 14 each)
HCPATIENTHCPATCHRGHCPATVISIT

One to one (1) — lookups and parents

RelationTableRulesConditionField map
HcpatientHCPATIENTRequired
HPV-COMPANY→HPT-COMPANY
HPV-PATIENT-ID→HPT-PATIENT-ID

One to many (1) — child tables

RelationTableRulesConditionField map
HcpatchrgHCPATCHRG
HPV-COMPANY→HPR-COMPANY
HPV-VISIT-NBR→HPR-VISIT-NBR
—→HPR-REV-CENTER
—→HPR-FROM-LOCATION
—→HPR-DATE-OF-CHRG
—→HPR-ITEM
—→HPR-CHARGE-SEQ

Programs

Updated by (225)

Referenced by (2)