HCPATIENT – Patient

System
Inventory Control (IC)
Prefix
HPT
Primary key
COMPANY, PATIENT-ID
Fields
9
Updated by
5 programs
Referenced by
37 programs

HCPATIENT is the Patient table in Lawson Inventory Control (prefix HPT). It is indexed by COMPANY, PATIENT-ID (HPTSET1); alternate indexes: HPTSET2. It is related 1:1 to ICCOMPANY and 1:M to HCPATVISIT. It is updated by CX506, PC20.2, PC310, PC520 and PC521 and referenced by CX100, CX20.1, CX20.2, CX20.4, CX20.5, CX220, CX240, CX30.1 and 29 more. The table has 9 fields, 2 indexes and 2 documented relations.

About HCPATIENT

This is the Patient Information file.

Fields (9)

Column = COBOL field name without the HPT- 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
#HPT-COMPANY PK
COMPANY
Numeric 4Identifies the AP company if the resource type = V. Identifies the HR company if the resource type = E. It is blank for type A, P or Q resources.CX506, PC20.2, PC520, PC521
#HPT-PATIENT-ID PK
PATIENT_ID
Alpha 12This uniquely identifies a patient within a company.CX506, PC20.2, PC520, PC521
#HPT-LAST-NAME SET2
LAST_NAME
Alpha 30 (Lower Case)This field contains the last name of the patient.CX240, CX506, PC20.2, PC520, PC521
#HPT-FIRST-NAME SET2
FIRST_NAME
Alpha 15 (Lower Case)This field contains the first name of the patient.CX240, CX506, PC20.2, PC520, PC521
#HPT-MIDDLE-INIT
MIDDLE_INIT
Alpha 1This field contains the middle initial of the patient.CX240, CX506, PC20.2, PC520, PC521
#HPT-BIRTHDATE
BIRTHDATE
Numeric 8 (yyyymmdd)This field contains the patient's date of birth.CX506, PC20.2, PC520, PC521
#HPT-UPDATE-DATE
UPDATE_DATE
Numeric 8 (yyyymmdd)This is the date of the last update to the patient record.PC20.2, PC520, PC521
#HPT-CONTRACT
CONTRACT
Alpha 15This field contains the contract information for the patient.PC20.2, PC520
#HPT-FICA-NBR
FICA_NBR
Alpha 20—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
HPTSET1
  1. COMPANY
  2. PATIENT-ID
PrimaryCX100, CX20.1, CX20.2, CX20.4, CX20.5, CX220, CX240, CX30.1 +22 more (list truncated in source)
HPTSET2
  1. COMPANY
  2. LAST-NAME
  3. FIRST-NAME
  4. PATIENT-ID
KeyChange—

Relations

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

One to one (1) — lookups and parents

RelationTableRulesConditionField map
IccompanyICCOMPANYRequired
HPT-COMPANY→ICC-COMPANY (ICCSET1)

One to many (1) — child tables

RelationTableRulesConditionField map
HcpatvisitHCPATVISIT
HPT-COMPANY→HPV-COMPANY
HPT-PATIENT-ID→HPV-PATIENT-ID
—→HPV-VISIT-NBR

Programs

Updated by (5)

Referenced by (37)