clqms-be/public/api-docs.yaml
mahdahar 10d87d21b4 refactor(api-docs): Split Master Data into Contacts and Locations modules
- Split monolithic master-data.yaml into separate contact.yaml and locations.yaml files
- Replace 'Master Data' tag with dedicated 'Contacts' and 'Locations' tags for better API organization
- Add complete CRUD operations for Contacts (GET, POST, PATCH, DELETE, GET by ID)
- Add complete CRUD operations for Locations (GET, POST, PATCH, DELETE, GET by ID)
- Enhance Contact schema with comprehensive fields: NameFirst, NameLast, Title, Initial,
  Birthdate, EmailAddress1/2, Phone, MobilePhone1/2, Specialty, SubSpecialty
- Enhance Location schema with additional fields: Description, LocType, improved Parent
  field documentation for hierarchical locations
- Update bundled API documentation to reflect new endpoint structure
- Remove deprecated Occupation, MedicalSpecialty, and Counter schemas from bundled docs
2026-02-18 08:45:54 +07:00

163 lines
5.4 KiB
YAML

openapi: 3.1.0
info:
title: CLQMS - Clinical Laboratory Quality Management System API
description: |
API for Clinical Laboratory Quality Management System supporting patient management,
specimen tracking, test ordering, instrument integration, and laboratory operations.
**IMPORTANT:** For OpenAPI tools (Swagger UI, Redoc, Postman, etc.), use the bundled file:
`api-docs.bundled.yaml` which contains all paths and schemas merged into one file.
This file (api-docs.yaml) contains schema references and is meant for development.
The paths are defined in separate files in the `paths/` directory.
version: 1.0.0
contact:
name: CLQMS API Support
license:
name: Proprietary
servers:
- url: http://localhost/clqms01/
description: Local development server
- url: https://clqms01-api.services-summit.my.id/
description: Production server
tags:
- name: Authentication
description: User authentication and session management
- name: Patients
description: Patient registration and management
- name: Patient Visits
description: Patient visit/encounter management
- name: Organization
description: Organization structure (accounts, sites, disciplines, departments, workstations)
- name: Specimen
description: Specimen and container management
- name: Tests
description: Test definitions and test catalog
- name: Orders
description: Laboratory order management
- name: Results
description: Patient results reporting
- name: Edge API
description: Instrument integration endpoints
- name: Contacts
description: Contact management (doctors, practitioners, etc.)
- name: Locations
description: Location management (rooms, wards, buildings)
- name: ValueSets
description: Value set definitions and items
- name: Demo
description: Demo/test endpoints (no authentication)
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: JWT token from login endpoint
cookieAuth:
type: apiKey
in: cookie
name: token
description: JWT token stored in HTTP-only cookie
schemas:
# Common schemas
SuccessResponse:
$ref: './components/schemas/common.yaml#/SuccessResponse'
ErrorResponse:
$ref: './components/schemas/common.yaml#/ErrorResponse'
DashboardSummary:
$ref: './components/schemas/common.yaml#/DashboardSummary'
# Authentication schemas
LoginRequest:
$ref: './components/schemas/authentication.yaml#/LoginRequest'
LoginResponse:
$ref: './components/schemas/authentication.yaml#/LoginResponse'
RegisterRequest:
$ref: './components/schemas/authentication.yaml#/RegisterRequest'
# Patient schemas
Patient:
$ref: './components/schemas/patient.yaml#/Patient'
PatientIdentifier:
$ref: './components/schemas/patient.yaml#/PatientIdentifier'
LinkedPatient:
$ref: './components/schemas/patient.yaml#/LinkedPatient'
Custodian:
$ref: './components/schemas/patient.yaml#/Custodian'
PatAttEntry:
$ref: './components/schemas/patient.yaml#/PatAttEntry'
PatientListResponse:
$ref: './components/schemas/patient.yaml#/PatientListResponse'
# Patient Visit schemas
PatientVisit:
$ref: './components/schemas/patient-visit.yaml#/PatientVisit'
PatVisitADT:
$ref: './components/schemas/patient-visit.yaml#/PatVisitADT'
# Organization schemas
Account:
$ref: './components/schemas/organization.yaml#/Account'
Site:
$ref: './components/schemas/organization.yaml#/Site'
Discipline:
$ref: './components/schemas/organization.yaml#/Discipline'
Department:
$ref: './components/schemas/organization.yaml#/Department'
Workstation:
$ref: './components/schemas/organization.yaml#/Workstation'
# Specimen schemas
Specimen:
$ref: './components/schemas/specimen.yaml#/Specimen'
ContainerDef:
$ref: './components/schemas/specimen.yaml#/ContainerDef'
SpecimenPrep:
$ref: './components/schemas/specimen.yaml#/SpecimenPrep'
SpecimenStatus:
$ref: './components/schemas/specimen.yaml#/SpecimenStatus'
SpecimenCollection:
$ref: './components/schemas/specimen.yaml#/SpecimenCollection'
# Tests schemas
TestDefinition:
$ref: './components/schemas/tests.yaml#/TestDefinition'
TestMap:
$ref: './components/schemas/tests.yaml#/TestMap'
# Orders schemas
OrderTest:
$ref: './components/schemas/orders.yaml#/OrderTest'
OrderItem:
$ref: './components/schemas/orders.yaml#/OrderItem'
# Edge API schemas
EdgeResultRequest:
$ref: './components/schemas/edge-api.yaml#/EdgeResultRequest'
EdgeResultResponse:
$ref: './components/schemas/edge-api.yaml#/EdgeResultResponse'
EdgeOrder:
$ref: './components/schemas/edge-api.yaml#/EdgeOrder'
# ValueSets schemas
ValueSetLibItem:
$ref: './components/schemas/valuesets.yaml#/ValueSetLibItem'
ValueSetDef:
$ref: './components/schemas/valuesets.yaml#/ValueSetDef'
ValueSetItem:
$ref: './components/schemas/valuesets.yaml#/ValueSetItem'
# Locations schemas
Location:
$ref: './components/schemas/master-data.yaml#/Location'
# Paths are in separate files in the paths/ directory
# To view the complete API with all paths, use: api-docs.bundled.yaml
# To rebuild the bundle after changes: python bundle-api-docs.py
paths: {}