Add AttDocFirstName, AttDocLastName, and AttDocContactCode to showByPatient via joins to contact and site-scoped contactdetail. Keep existing AttDoc ID field unchanged for backward compatibility. Update PatientVisit OpenAPI schema, regenerate bundled docs, and extend PatVisitByPatientTest assertions for new fields.
121 lines
3.1 KiB
YAML
Executable File
121 lines
3.1 KiB
YAML
Executable File
PatientVisit:
|
|
type: object
|
|
properties:
|
|
InternalPVID:
|
|
type: integer
|
|
description: Primary key (auto-generated)
|
|
PVID:
|
|
type: string
|
|
description: Visit ID (auto-generated with DV prefix if not provided)
|
|
InternalPID:
|
|
type: integer
|
|
description: Reference to patient
|
|
EpisodeID:
|
|
type: string
|
|
description: Episode identifier
|
|
SiteID:
|
|
type: integer
|
|
description: Site reference
|
|
LastLocation:
|
|
type: string
|
|
description: Full name of the last/current location from patvisitadt
|
|
AttDocFirstName:
|
|
type: string
|
|
nullable: true
|
|
description: Attending doctor first name (from contact)
|
|
AttDocLastName:
|
|
type: string
|
|
nullable: true
|
|
description: Attending doctor last name (from contact)
|
|
AttDocContactCode:
|
|
type: string
|
|
nullable: true
|
|
description: Attending doctor contact code for visit SiteID (from contactdetail)
|
|
CreateDate:
|
|
type: string
|
|
format: date-time
|
|
EndDate:
|
|
type: string
|
|
format: date-time
|
|
ArchivedDate:
|
|
type: string
|
|
format: date-time
|
|
DelDate:
|
|
type: string
|
|
format: date-time
|
|
PatDiag:
|
|
type: object
|
|
description: Diagnosis information (optional)
|
|
properties:
|
|
DiagCode:
|
|
type: string
|
|
Diagnosis:
|
|
type: string
|
|
PatVisitADT:
|
|
type: object
|
|
description: ADT (Admission/Discharge/Transfer) information (optional)
|
|
properties:
|
|
ADTCode:
|
|
type: string
|
|
enum: [A01, A02, A03, A04, A08]
|
|
LocationID:
|
|
type: integer
|
|
AttDoc:
|
|
type: integer
|
|
description: Attending physician ContactID
|
|
RefDoc:
|
|
type: integer
|
|
description: Referring physician ContactID
|
|
AdmDoc:
|
|
type: integer
|
|
description: Admitting physician ContactID
|
|
CnsDoc:
|
|
type: integer
|
|
description: Consulting physician ContactID
|
|
|
|
PatVisitADT:
|
|
type: object
|
|
properties:
|
|
PVADTID:
|
|
type: integer
|
|
description: Primary key (auto-generated)
|
|
InternalPVID:
|
|
type: integer
|
|
description: Reference to patient visit
|
|
ADTCode:
|
|
type: string
|
|
enum: [A01, A02, A03, A04, A08]
|
|
description: |
|
|
A01: Admit
|
|
A02: Transfer
|
|
A03: Discharge
|
|
A04: Register
|
|
A08: Update
|
|
LocationID:
|
|
type: integer
|
|
description: Location/ward reference
|
|
AttDoc:
|
|
type: integer
|
|
description: Attending physician ContactID
|
|
RefDoc:
|
|
type: integer
|
|
description: Referring physician ContactID
|
|
AdmDoc:
|
|
type: integer
|
|
description: Admitting physician ContactID
|
|
CnsDoc:
|
|
type: integer
|
|
description: Consulting physician ContactID
|
|
CreateDate:
|
|
type: string
|
|
format: date-time
|
|
EndDate:
|
|
type: string
|
|
format: date-time
|
|
ArchivedDate:
|
|
type: string
|
|
format: date-time
|
|
DelDate:
|
|
type: string
|
|
format: date-time
|