2026-03-16 07:24:50 +07:00
|
|
|
/api/patient:
|
2026-03-16 15:58:56 +07:00
|
|
|
get:
|
|
|
|
|
tags: [Patient]
|
2026-03-16 07:24:50 +07:00
|
|
|
summary: List patients
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
parameters:
|
|
|
|
|
- name: page
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: integer
|
|
|
|
|
default: 1
|
|
|
|
|
- name: perPage
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: integer
|
|
|
|
|
default: 20
|
|
|
|
|
- name: InternalPID
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: integer
|
|
|
|
|
description: Filter by internal patient ID
|
|
|
|
|
- name: PatientID
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
description: Filter by patient ID
|
|
|
|
|
- name: Name
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
description: Search by patient name
|
|
|
|
|
- name: Birthdate
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
format: date
|
|
|
|
|
description: Filter by birthdate (YYYY-MM-DD)
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: List of patients
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '../components/schemas/patient.yaml#/PatientListResponse'
|
|
|
|
|
|
2026-03-16 15:58:56 +07:00
|
|
|
post:
|
|
|
|
|
tags: [Patient]
|
2026-03-16 07:24:50 +07:00
|
|
|
summary: Create new patient
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '../components/schemas/patient.yaml#/Patient'
|
|
|
|
|
responses:
|
|
|
|
|
'201':
|
|
|
|
|
description: Patient created successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '../components/schemas/common.yaml#/SuccessResponse'
|
|
|
|
|
'422':
|
|
|
|
|
description: Validation error
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '../components/schemas/common.yaml#/ErrorResponse'
|
|
|
|
|
|
|
|
|
|
|
2026-03-16 15:58:56 +07:00
|
|
|
delete:
|
|
|
|
|
tags: [Patient]
|
2026-03-16 07:24:50 +07:00
|
|
|
summary: Delete patient (soft delete)
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- InternalPID
|
|
|
|
|
properties:
|
|
|
|
|
InternalPID:
|
|
|
|
|
type: integer
|
|
|
|
|
description: Internal patient record ID
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Patient deleted successfully
|
|
|
|
|
|
2026-03-16 15:58:56 +07:00
|
|
|
/api/patient/check:
|
|
|
|
|
get:
|
|
|
|
|
tags: [Patient]
|
2026-04-13 11:25:41 +07:00
|
|
|
summary: Check if patient exists
|
2026-03-16 07:24:50 +07:00
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
parameters:
|
2026-04-13 11:25:41 +07:00
|
|
|
- name: PatientID
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
description: Patient ID to check
|
|
|
|
|
- name: EmailAddress
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
format: email
|
|
|
|
|
description: Email address to check
|
|
|
|
|
- name: Phone
|
|
|
|
|
in: query
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
description: Phone number to check
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Patient check result
|
2026-03-16 07:24:50 +07:00
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
exists:
|
|
|
|
|
type: boolean
|
|
|
|
|
data:
|
|
|
|
|
$ref: '../components/schemas/patient.yaml#/Patient'
|
|
|
|
|
|
2026-03-16 15:58:56 +07:00
|
|
|
/api/patient/{id}:
|
|
|
|
|
get:
|
|
|
|
|
tags: [Patient]
|
2026-03-16 07:24:50 +07:00
|
|
|
summary: Get patient by ID
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
parameters:
|
|
|
|
|
- name: id
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: integer
|
|
|
|
|
description: Internal patient record ID
|
2026-03-16 15:58:56 +07:00
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Patient details
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
status:
|
|
|
|
|
type: string
|
|
|
|
|
data:
|
|
|
|
|
$ref: '../components/schemas/patient.yaml#/Patient'
|
|
|
|
|
|
|
|
|
|
patch:
|
|
|
|
|
tags: [Patient]
|
2026-04-06 14:21:46 +07:00
|
|
|
summary: Partially update patient
|
2026-03-16 15:58:56 +07:00
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
parameters:
|
|
|
|
|
- name: id
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: integer
|
|
|
|
|
description: Internal patient record ID
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2026-04-06 14:21:46 +07:00
|
|
|
$ref: '../components/schemas/patient.yaml#/PatientPatch'
|
2026-03-16 15:58:56 +07:00
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Patient updated successfully
|
2026-04-06 14:21:46 +07:00
|
|
|
'400':
|
|
|
|
|
description: Validation error
|
|
|
|
|
'404':
|
|
|
|
|
description: Patient not found
|