docs(api): add DepartmentID query filter to tests endpoints

Add DepartmentID as optional query parameter in tests path spec. Regenerate bundled OpenAPI so bundled contract matches source docs and includes latest wording updates.
This commit is contained in:
mahdahar 2026-04-23 16:30:06 +07:00
parent 83278d332a
commit 796dc94286
2 changed files with 302 additions and 292 deletions

View File

@ -1505,9 +1505,9 @@ paths:
Tests: Tests:
type: object type: object
properties: properties:
added: created:
type: array type: array
description: New tests to add to this order description: New tests to create for this order
items: items:
type: object type: object
properties: properties:
@ -4696,6 +4696,11 @@ paths:
schema: schema:
type: integer type: integer
description: Filter by site ID description: Filter by site ID
- name: DepartmentID
in: query
schema:
type: integer
description: Filter by department ID
- name: TestType - name: TestType
in: query in: query
schema: schema:

View File

@ -22,6 +22,11 @@
schema: schema:
type: integer type: integer
description: Filter by site ID description: Filter by site ID
- name: DepartmentID
in: query
schema:
type: integer
description: Filter by department ID
- name: TestType - name: TestType
in: query in: query
schema: schema:
@ -185,21 +190,21 @@
FormulaCode: FormulaCode:
type: string type: string
description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}") description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}")
testdefgrp: testdefgrp:
type: object type: object
description: Group definition wrapper for CALC/GROUP member assignments. description: Group definition wrapper for CALC/GROUP member assignments.
properties: properties:
members: members:
type: array type: array
description: Array of member TestSiteIDs for CALC/GROUP definitions. description: Array of member TestSiteIDs for CALC/GROUP definitions.
items: items:
type: object type: object
properties: properties:
TestSiteID: TestSiteID:
type: integer type: integer
description: Foreign key referencing the member test's TestSiteID. description: Foreign key referencing the member test's TestSiteID.
required: required:
- TestSiteID - TestSiteID
refnum: refnum:
type: array type: array
items: items:
@ -208,32 +213,32 @@
type: array type: array
items: items:
type: object type: object
testmap: testmap:
type: array type: array
items: items:
type: object type: object
properties: properties:
HostType: HostType:
type: string type: string
HostID: HostID:
type: string type: string
HostTestCode: HostTestCode:
type: string type: string
HostTestName: HostTestName:
type: string type: string
ClientType: ClientType:
type: string type: string
ClientID: ClientID:
type: string type: string
ClientTestCode: ClientTestCode:
type: string type: string
ClientTestName: ClientTestName:
type: string type: string
ConDefID: ConDefID:
type: integer type: integer
nullable: true nullable: true
required: required:
- SiteID - SiteID
- TestSiteCode - TestSiteCode
- TestSiteName - TestSiteName
- TestType - TestType
@ -290,8 +295,8 @@
Low: 70 Low: 70
HighSign: LE HighSign: LE
High: 100 High: 100
AgeStart: 6570 AgeStart: 6570
AgeEnd: 36135 AgeEnd: 36135
Flag: N Flag: N
DisciplineID: 2 DisciplineID: 2
DepartmentID: 2 DepartmentID: 2
@ -319,8 +324,8 @@
Low: 70 Low: 70
HighSign: LE HighSign: LE
High: 100 High: 100
AgeStart: 6570 AgeStart: 6570
AgeEnd: 36135 AgeEnd: 36135
Flag: N Flag: N
- NumRefType: NMRC - NumRefType: NMRC
RangeType: REF RangeType: REF
@ -329,37 +334,37 @@
Low: 75 Low: 75
HighSign: < HighSign: <
High: 105 High: 105
AgeStart: 6570 AgeStart: 6570
AgeEnd: 36135 AgeEnd: 36135
Flag: N Flag: N
testmap: testmap:
- HostType: SITE - HostType: SITE
HostID: '1' HostID: '1'
HostTestCode: GLU HostTestCode: GLU
HostTestName: Glucose HostTestName: Glucose
ClientType: WST ClientType: WST
ClientID: '1' ClientID: '1'
ClientTestCode: GLU_C ClientTestCode: GLU_C
ClientTestName: Glucose Client ClientTestName: Glucose Client
ConDefID: 1 ConDefID: 1
- HostType: SITE - HostType: SITE
HostID: '1' HostID: '1'
HostTestCode: CREA HostTestCode: CREA
HostTestName: Creatinine HostTestName: Creatinine
ClientType: WST ClientType: WST
ClientID: '1' ClientID: '1'
ClientTestCode: CREA_C ClientTestCode: CREA_C
ClientTestName: Creatinine Client ClientTestName: Creatinine Client
ConDefID: 2 ConDefID: 2
- HostType: WST - HostType: WST
HostID: '3' HostID: '3'
HostTestCode: HB HostTestCode: HB
HostTestName: Hemoglobin HostTestName: Hemoglobin
ClientType: INST ClientType: INST
ClientID: '2' ClientID: '2'
ClientTestCode: HB_C ClientTestCode: HB_C
ClientTestName: Hemoglobin Client ClientTestName: Hemoglobin Client
ConDefID: 3 ConDefID: 3
DisciplineID: 2 DisciplineID: 2
DepartmentID: 2 DepartmentID: 2
ResultType: NMRIC ResultType: NMRIC
@ -385,7 +390,7 @@
LowSign: LT LowSign: LT
Low: 120 Low: 120
AgeStart: 0 AgeStart: 0
AgeEnd: 45625 AgeEnd: 45625
Flag: H Flag: H
DisciplineID: 2 DisciplineID: 2
DepartmentID: 2 DepartmentID: 2
@ -412,7 +417,7 @@
LowSign: LT LowSign: LT
Low: 120 Low: 120
AgeStart: 0 AgeStart: 0
AgeEnd: 45625 AgeEnd: 45625
Flag: H Flag: H
- NumRefType: THOLD - NumRefType: THOLD
RangeType: PANIC RangeType: PANIC
@ -420,7 +425,7 @@
LowSign: < LowSign: <
Low: 121 Low: 121
AgeStart: 0 AgeStart: 0
AgeEnd: 45625 AgeEnd: 45625
Flag: H Flag: H
testmap: testmap:
- HostType: SITE - HostType: SITE
@ -460,8 +465,8 @@
- SpcType: GEN - SpcType: GEN
TxtRefType: TEXT TxtRefType: TEXT
Sex: '2' Sex: '2'
AgeStart: 6570 AgeStart: 6570
AgeEnd: 36135 AgeEnd: 36135
RefTxt: NORM=Normal;HIGH=High RefTxt: NORM=Normal;HIGH=High
Flag: N Flag: N
DisciplineID: 1 DisciplineID: 1
@ -485,15 +490,15 @@
- SpcType: GEN - SpcType: GEN
TxtRefType: TEXT TxtRefType: TEXT
Sex: '2' Sex: '2'
AgeStart: 6570 AgeStart: 6570
AgeEnd: 36135 AgeEnd: 36135
RefTxt: NORM=Normal RefTxt: NORM=Normal
Flag: N Flag: N
- SpcType: GEN - SpcType: GEN
TxtRefType: TEXT TxtRefType: TEXT
Sex: '1' Sex: '1'
AgeStart: 6570 AgeStart: 6570
AgeEnd: 36135 AgeEnd: 36135
RefTxt: ABN=Abnormal RefTxt: ABN=Abnormal
Flag: N Flag: N
testmap: testmap:
@ -528,7 +533,7 @@
TxtRefType: VSET TxtRefType: VSET
Sex: '2' Sex: '2'
AgeStart: 0 AgeStart: 0
AgeEnd: 43800 AgeEnd: 43800
RefTxt: NORM=Normal;MACRO=Macro RefTxt: NORM=Normal;MACRO=Macro
Flag: N Flag: N
DisciplineID: 4 DisciplineID: 4
@ -553,7 +558,7 @@
TxtRefType: VSET TxtRefType: VSET
Sex: '2' Sex: '2'
AgeStart: 0 AgeStart: 0
AgeEnd: 43800 AgeEnd: 43800
RefTxt: NORM=Normal;ABN=Abnormal RefTxt: NORM=Normal;ABN=Abnormal
Flag: N Flag: N
testmap: testmap:
@ -612,12 +617,12 @@
isCountStat: 0 isCountStat: 0
DisciplineID: 2 DisciplineID: 2
DepartmentID: 2 DepartmentID: 2
testdefcal: testdefcal:
FormulaCode: CKD_EPI(CREA,AGE,GENDER) FormulaCode: CKD_EPI(CREA,AGE,GENDER)
testdefgrp: testdefgrp:
members: members:
- TestSiteID: 21 - TestSiteID: 21
- TestSiteID: 22 - TestSiteID: 22
CALC_full: CALC_full:
summary: Calculated test with numeric reference ranges and map summary: Calculated test with numeric reference ranges and map
value: value:
@ -638,8 +643,8 @@
Low: 10 Low: 10
HighSign: LE HighSign: LE
High: 20 High: 20
AgeStart: 6570 AgeStart: 6570
AgeEnd: 43800 AgeEnd: 43800
Flag: N Flag: N
testmap: testmap:
- HostType: SITE - HostType: SITE
@ -654,12 +659,12 @@
ClientTestName: eGFR Client ClientTestName: eGFR Client
DisciplineID: 2 DisciplineID: 2
DepartmentID: 2 DepartmentID: 2
testdefcal: testdefcal:
FormulaCode: CKD_EPI(CREA,AGE,GENDER) FormulaCode: CKD_EPI(CREA,AGE,GENDER)
testdefgrp: testdefgrp:
members: members:
- TestSiteID: 21 - TestSiteID: 21
- TestSiteID: 22 - TestSiteID: 22
GROUP_with_members: GROUP_with_members:
summary: Group/profile test with members and mapping summary: Group/profile test with members and mapping
value: value:
@ -683,10 +688,10 @@
ConDefID: 1 ConDefID: 1
ClientTestCode: LIPID_C ClientTestCode: LIPID_C
ClientTestName: Lipid Client ClientTestName: Lipid Client
testdefgrp: testdefgrp:
members: members:
- TestSiteID: 169 - TestSiteID: 169
- TestSiteID: 170 - TestSiteID: 170
responses: responses:
'201': '201':
@ -720,10 +725,10 @@
type: string type: string
example: 'Invalid member TestSiteID(s): 185, 186. Make sure to use TestSiteID, not SeqScr or other values.' example: 'Invalid member TestSiteID(s): 185, 186. Make sure to use TestSiteID, not SeqScr or other values.'
/api/test/{id}: /api/test/{id}:
get: get:
tags: [Test] tags: [Test]
summary: Get test definition by ID summary: Get test definition by ID
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
@ -734,188 +739,188 @@
type: integer type: integer
description: Test Site ID description: Test Site ID
responses: responses:
'200': '200':
description: Test definition details description: Test definition details
content: content:
application/json: application/json:
schema: schema:
type: object type: object
properties: properties:
status: status:
type: string type: string
message: message:
type: string type: string
data: data:
$ref: '../components/schemas/tests.yaml#/TestDefinition' $ref: '../components/schemas/tests.yaml#/TestDefinition'
'404': '404':
description: Test not found description: Test not found
patch: patch:
tags: [Test] tags: [Test]
summary: Update test definition summary: Update test definition
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
- name: id - name: id
in: path in: path
required: true required: true
schema: schema:
type: integer type: integer
description: Test Site ID description: Test Site ID
requestBody: requestBody:
required: true required: true
content: content:
application/json: application/json:
schema: schema:
type: object type: object
properties: properties:
TestSiteID: TestSiteID:
type: integer type: integer
description: Test Site ID (required) description: Test Site ID (required)
TestSiteCode: TestSiteCode:
type: string type: string
TestSiteName: TestSiteName:
type: string type: string
TestType: TestType:
type: string type: string
enum: [TEST, PARAM, CALC, GROUP, TITLE] enum: [TEST, PARAM, CALC, GROUP, TITLE]
Description: Description:
type: string type: string
DisciplineID: DisciplineID:
type: integer type: integer
DepartmentID: DepartmentID:
type: integer type: integer
ResultType: ResultType:
type: string type: string
enum: [NMRIC, RANGE, TEXT, VSET, NORES] enum: [NMRIC, RANGE, TEXT, VSET, NORES]
RefType: RefType:
type: string type: string
enum: [RANGE, THOLD, VSET, TEXT, NOREF] enum: [RANGE, THOLD, VSET, TEXT, NOREF]
VSet: VSet:
type: integer type: integer
ReqQty: ReqQty:
type: number type: number
format: decimal format: decimal
ReqQtyUnit: ReqQtyUnit:
type: string type: string
Unit1: Unit1:
type: string type: string
Factor: Factor:
type: number type: number
format: decimal format: decimal
Unit2: Unit2:
type: string type: string
Decimal: Decimal:
type: integer type: integer
CollReq: CollReq:
type: string type: string
Method: Method:
type: string type: string
ExpectedTAT: ExpectedTAT:
type: integer type: integer
SeqScr: SeqScr:
type: integer type: integer
SeqRpt: SeqRpt:
type: integer type: integer
IndentLeft: IndentLeft:
type: integer type: integer
FontStyle: FontStyle:
type: string type: string
isVisibleScr: isVisibleScr:
type: integer type: integer
isVisibleRpt: isVisibleRpt:
type: integer type: integer
isCountStat: isCountStat:
type: integer type: integer
testdefcal: testdefcal:
type: object type: object
description: Calculated test metadata persisted in the `testdefcal` table. description: Calculated test metadata persisted in the `testdefcal` table.
properties: properties:
FormulaCode: FormulaCode:
type: string type: string
description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}") description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}")
testdefgrp: testdefgrp:
type: object type: object
description: Group definition wrapper for CALC/GROUP member assignments. description: Group definition wrapper for CALC/GROUP member assignments.
properties: properties:
members: members:
type: array type: array
description: Array of member TestSiteIDs for CALC/GROUP definitions. description: Array of member TestSiteIDs for CALC/GROUP definitions.
items: items:
type: object type: object
properties: properties:
TestSiteID: TestSiteID:
type: integer type: integer
description: Foreign key referencing the member test's TestSiteID. description: Foreign key referencing the member test's TestSiteID.
required: required:
- TestSiteID - TestSiteID
refnum: refnum:
type: array type: array
items: items:
type: object type: object
reftxt: reftxt:
type: array type: array
items: items:
type: object type: object
testmap: testmap:
type: array type: array
items: items:
type: object type: object
properties: properties:
HostType: HostType:
type: string type: string
HostID: HostID:
type: string type: string
HostTestCode: HostTestCode:
type: string type: string
HostTestName: HostTestName:
type: string type: string
ClientType: ClientType:
type: string type: string
ClientID: ClientID:
type: string type: string
ClientTestCode: ClientTestCode:
type: string type: string
ClientTestName: ClientTestName:
type: string type: string
ConDefID: ConDefID:
type: integer type: integer
nullable: true nullable: true
required: required:
- TestSiteID - TestSiteID
responses: responses:
'200': '200':
description: Test definition updated description: Test definition updated
content: content:
application/json: application/json:
schema: schema:
type: object type: object
properties: properties:
status: status:
type: string type: string
example: success example: success
message: message:
type: string type: string
data: data:
type: object type: object
properties: properties:
TestSiteId: TestSiteId:
type: integer type: integer
'400': '400':
description: Validation error (e.g., invalid member TestSiteID) description: Validation error (e.g., invalid member TestSiteID)
content: content:
application/json: application/json:
schema: schema:
type: object type: object
properties: properties:
status: status:
type: string type: string
example: failed example: failed
message: message:
type: string type: string
example: 'Invalid member TestSiteID(s): 185, 186. Make sure to use TestSiteID, not SeqScr or other values.' example: 'Invalid member TestSiteID(s): 185, 186. Make sure to use TestSiteID, not SeqScr or other values.'
delete: delete:
tags: [Test] tags: [Test]
summary: Soft delete test definition summary: Soft delete test definition
security: security: