clqms-be/public/components/schemas/patient-visit.yaml
mahdahar 42006e1af9 feat: implement comprehensive order management with specimens and tests
Major updates to order system:
- Add specimen and test data to order responses (index, show, create, update, status update)
- Implement getOrderSpecimens() and getOrderTests() private methods in OrderTestController
- Support 'include=details' query parameter for expanded order data
- Update OrderTestModel with enhanced query capabilities and transaction handling

API documentation:
- Update OpenAPI specs for orders, patient-visits, and tests
- Add new schemas for order specimens and tests
- Regenerate bundled API documentation

Database:
- Add Requestable field to TestDefSite migration
- Create OrderSeeder and ClearOrderDataSeeder for test data
- Update DBSeeder to include order seeding

Patient visits:
- Add filtering by PatientID, PatientName, and date ranges
- Include LastLocation in visit queries

Testing:
- Add OrderCreateTest with comprehensive test coverage

Documentation:
- Update AGENTS.md with improved controller structure examples
2026-03-03 13:51:27 +07:00

109 lines
2.6 KiB
YAML

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
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