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
This commit is contained in:
parent
ac0ffb679a
commit
10d87d21b4
@ -39,8 +39,10 @@ tags:
|
|||||||
description: Patient results reporting
|
description: Patient results reporting
|
||||||
- name: Edge API
|
- name: Edge API
|
||||||
description: Instrument integration endpoints
|
description: Instrument integration endpoints
|
||||||
- name: Master Data
|
- name: Contacts
|
||||||
description: Lookup and reference data
|
description: Contact management (doctors, practitioners, etc.)
|
||||||
|
- name: Locations
|
||||||
|
description: Location management (rooms, wards, buildings)
|
||||||
- name: ValueSets
|
- name: ValueSets
|
||||||
description: Value set definitions and items
|
description: Value set definitions and items
|
||||||
- name: Demo
|
- name: Demo
|
||||||
@ -214,6 +216,231 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
'201':
|
'201':
|
||||||
description: User created
|
description: User created
|
||||||
|
/api/contact:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Contacts
|
||||||
|
summary: List contacts
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: ContactName
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Filter by contact name (searches in NameFirst and NameLast)
|
||||||
|
- name: Specialty
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Filter by medical specialty code
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of contacts
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Contact'
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Contacts
|
||||||
|
summary: Create new contact
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- NameFirst
|
||||||
|
properties:
|
||||||
|
NameFirst:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
NameLast:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
Title:
|
||||||
|
type: string
|
||||||
|
description: Title (e.g., Dr, Mr, Mrs)
|
||||||
|
Initial:
|
||||||
|
type: string
|
||||||
|
description: Middle initial
|
||||||
|
Birthdate:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
description: Date of birth
|
||||||
|
EmailAddress1:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Primary email address
|
||||||
|
EmailAddress2:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Secondary email address
|
||||||
|
Phone:
|
||||||
|
type: string
|
||||||
|
description: Primary phone number
|
||||||
|
MobilePhone1:
|
||||||
|
type: string
|
||||||
|
description: Primary mobile number
|
||||||
|
MobilePhone2:
|
||||||
|
type: string
|
||||||
|
description: Secondary mobile number
|
||||||
|
Specialty:
|
||||||
|
type: string
|
||||||
|
description: Medical specialty code
|
||||||
|
SubSpecialty:
|
||||||
|
type: string
|
||||||
|
description: Sub-specialty code
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Contact created successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/SuccessResponse'
|
||||||
|
'422':
|
||||||
|
description: Validation error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ErrorResponse'
|
||||||
|
patch:
|
||||||
|
tags:
|
||||||
|
- Contacts
|
||||||
|
summary: Update contact
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- ContactID
|
||||||
|
- NameFirst
|
||||||
|
properties:
|
||||||
|
ContactID:
|
||||||
|
type: integer
|
||||||
|
description: Contact ID to update
|
||||||
|
NameFirst:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
NameLast:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
Title:
|
||||||
|
type: string
|
||||||
|
description: Title (e.g., Dr, Mr, Mrs)
|
||||||
|
Initial:
|
||||||
|
type: string
|
||||||
|
description: Middle initial
|
||||||
|
Birthdate:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
description: Date of birth
|
||||||
|
EmailAddress1:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Primary email address
|
||||||
|
EmailAddress2:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Secondary email address
|
||||||
|
Phone:
|
||||||
|
type: string
|
||||||
|
description: Primary phone number
|
||||||
|
MobilePhone1:
|
||||||
|
type: string
|
||||||
|
description: Primary mobile number
|
||||||
|
MobilePhone2:
|
||||||
|
type: string
|
||||||
|
description: Secondary mobile number
|
||||||
|
Specialty:
|
||||||
|
type: string
|
||||||
|
description: Medical specialty code
|
||||||
|
SubSpecialty:
|
||||||
|
type: string
|
||||||
|
description: Sub-specialty code
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Contact updated successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/SuccessResponse'
|
||||||
|
'422':
|
||||||
|
description: Validation error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ErrorResponse'
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Contacts
|
||||||
|
summary: Delete contact
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- ContactID
|
||||||
|
properties:
|
||||||
|
ContactID:
|
||||||
|
type: integer
|
||||||
|
description: Contact ID to delete
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Contact deleted successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/SuccessResponse'
|
||||||
|
/api/contact/{id}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Contacts
|
||||||
|
summary: Get contact by ID
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: Contact ID
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Contact details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
$ref: '#/components/schemas/Contact'
|
||||||
/api/demo/hello:
|
/api/demo/hello:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -370,7 +597,7 @@ paths:
|
|||||||
/api/location:
|
/api/location:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Master Data
|
- Locations
|
||||||
summary: List locations
|
summary: List locations
|
||||||
security:
|
security:
|
||||||
- bearerAuth: []
|
- bearerAuth: []
|
||||||
@ -403,7 +630,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/Location'
|
$ref: '#/components/schemas/Location'
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Master Data
|
- Locations
|
||||||
summary: Create location
|
summary: Create location
|
||||||
security:
|
security:
|
||||||
- bearerAuth: []
|
- bearerAuth: []
|
||||||
@ -419,14 +646,145 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
SiteID:
|
SiteID:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: Reference to site
|
||||||
LocCode:
|
LocCode:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 6
|
maxLength: 6
|
||||||
|
description: Location code (short identifier)
|
||||||
Parent:
|
Parent:
|
||||||
type: integer
|
type: integer
|
||||||
|
nullable: true
|
||||||
|
description: Parent location ID for hierarchical locations
|
||||||
LocFull:
|
LocFull:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 255
|
maxLength: 255
|
||||||
|
description: Full location name
|
||||||
|
Description:
|
||||||
|
type: string
|
||||||
|
maxLength: 255
|
||||||
|
description: Location description
|
||||||
|
LocType:
|
||||||
|
type: string
|
||||||
|
description: Location type code (e.g., ROOM, WARD, BUILDING)
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Location created successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/SuccessResponse'
|
||||||
|
'422':
|
||||||
|
description: Validation error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ErrorResponse'
|
||||||
|
patch:
|
||||||
|
tags:
|
||||||
|
- Locations
|
||||||
|
summary: Update location
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- LocationID
|
||||||
|
properties:
|
||||||
|
LocationID:
|
||||||
|
type: integer
|
||||||
|
description: Location ID to update
|
||||||
|
SiteID:
|
||||||
|
type: integer
|
||||||
|
description: Reference to site
|
||||||
|
LocCode:
|
||||||
|
type: string
|
||||||
|
maxLength: 6
|
||||||
|
description: Location code (short identifier)
|
||||||
|
Parent:
|
||||||
|
type: integer
|
||||||
|
nullable: true
|
||||||
|
description: Parent location ID for hierarchical locations
|
||||||
|
LocFull:
|
||||||
|
type: string
|
||||||
|
maxLength: 255
|
||||||
|
description: Full location name
|
||||||
|
Description:
|
||||||
|
type: string
|
||||||
|
maxLength: 255
|
||||||
|
description: Location description
|
||||||
|
LocType:
|
||||||
|
type: string
|
||||||
|
description: Location type code (e.g., ROOM, WARD, BUILDING)
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Location updated successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/SuccessResponse'
|
||||||
|
'422':
|
||||||
|
description: Validation error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ErrorResponse'
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Locations
|
||||||
|
summary: Delete location
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- LocationID
|
||||||
|
properties:
|
||||||
|
LocationID:
|
||||||
|
type: integer
|
||||||
|
description: Location ID to delete
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Location deleted successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/SuccessResponse'
|
||||||
|
/api/location/{id}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Locations
|
||||||
|
summary: Get location by ID
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: Location ID
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Location details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
$ref: '#/components/schemas/Location'
|
||||||
/api/ordertest:
|
/api/ordertest:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -4056,69 +4414,3 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
description: Occupation display text
|
description: Occupation display text
|
||||||
Occupation:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
OccupationID:
|
|
||||||
type: integer
|
|
||||||
description: Primary key
|
|
||||||
OccCode:
|
|
||||||
type: string
|
|
||||||
description: Occupation code
|
|
||||||
OccText:
|
|
||||||
type: string
|
|
||||||
description: Occupation name/text
|
|
||||||
Description:
|
|
||||||
type: string
|
|
||||||
description: Additional description
|
|
||||||
CreateDate:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
MedicalSpecialty:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
SpecialtyID:
|
|
||||||
type: integer
|
|
||||||
description: Primary key
|
|
||||||
SpecialtyText:
|
|
||||||
type: string
|
|
||||||
description: Specialty name/text
|
|
||||||
Parent:
|
|
||||||
type: integer
|
|
||||||
description: Parent specialty ID for hierarchical structure
|
|
||||||
Title:
|
|
||||||
type: string
|
|
||||||
description: Title/abbreviation
|
|
||||||
CreateDate:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
EndDate:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
Counter:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
CounterID:
|
|
||||||
type: integer
|
|
||||||
description: Primary key
|
|
||||||
CounterDesc:
|
|
||||||
type: string
|
|
||||||
description: Counter description/name
|
|
||||||
CounterValue:
|
|
||||||
type: integer
|
|
||||||
description: Current counter value
|
|
||||||
CounterStart:
|
|
||||||
type: integer
|
|
||||||
description: Starting value for the counter
|
|
||||||
CounterEnd:
|
|
||||||
type: integer
|
|
||||||
description: Ending value (for auto-reset)
|
|
||||||
CounterReset:
|
|
||||||
type: string
|
|
||||||
description: Reset pattern (e.g., D=Daily, M=Monthly, Y=Yearly)
|
|
||||||
CreateDate:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
EndDate:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
|
|||||||
@ -41,8 +41,10 @@ tags:
|
|||||||
description: Patient results reporting
|
description: Patient results reporting
|
||||||
- name: Edge API
|
- name: Edge API
|
||||||
description: Instrument integration endpoints
|
description: Instrument integration endpoints
|
||||||
- name: Master Data
|
- name: Contacts
|
||||||
description: Lookup and reference data
|
description: Contact management (doctors, practitioners, etc.)
|
||||||
|
- name: Locations
|
||||||
|
description: Location management (rooms, wards, buildings)
|
||||||
- name: ValueSets
|
- name: ValueSets
|
||||||
description: Value set definitions and items
|
description: Value set definitions and items
|
||||||
- name: Demo
|
- name: Demo
|
||||||
@ -150,17 +152,9 @@ components:
|
|||||||
ValueSetItem:
|
ValueSetItem:
|
||||||
$ref: './components/schemas/valuesets.yaml#/ValueSetItem'
|
$ref: './components/schemas/valuesets.yaml#/ValueSetItem'
|
||||||
|
|
||||||
# Master Data schemas
|
# Locations schemas
|
||||||
Location:
|
Location:
|
||||||
$ref: './components/schemas/master-data.yaml#/Location'
|
$ref: './components/schemas/master-data.yaml#/Location'
|
||||||
Contact:
|
|
||||||
$ref: './components/schemas/master-data.yaml#/Contact'
|
|
||||||
Occupation:
|
|
||||||
$ref: './components/schemas/master-data.yaml#/Occupation'
|
|
||||||
MedicalSpecialty:
|
|
||||||
$ref: './components/schemas/master-data.yaml#/MedicalSpecialty'
|
|
||||||
Counter:
|
|
||||||
$ref: './components/schemas/master-data.yaml#/Counter'
|
|
||||||
|
|
||||||
# Paths are in separate files in the paths/ directory
|
# Paths are in separate files in the paths/ directory
|
||||||
# To view the complete API with all paths, use: api-docs.bundled.yaml
|
# To view the complete API with all paths, use: api-docs.bundled.yaml
|
||||||
|
|||||||
224
public/paths/contact.yaml
Normal file
224
public/paths/contact.yaml
Normal file
@ -0,0 +1,224 @@
|
|||||||
|
/api/contact:
|
||||||
|
get:
|
||||||
|
tags: [Contacts]
|
||||||
|
summary: List contacts
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: ContactName
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Filter by contact name (searches in NameFirst and NameLast)
|
||||||
|
- name: Specialty
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Filter by medical specialty code
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of contacts
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '../components/schemas/master-data.yaml#/Contact'
|
||||||
|
|
||||||
|
post:
|
||||||
|
tags: [Contacts]
|
||||||
|
summary: Create new contact
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- NameFirst
|
||||||
|
properties:
|
||||||
|
NameFirst:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
NameLast:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
Title:
|
||||||
|
type: string
|
||||||
|
description: Title (e.g., Dr, Mr, Mrs)
|
||||||
|
Initial:
|
||||||
|
type: string
|
||||||
|
description: Middle initial
|
||||||
|
Birthdate:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
description: Date of birth
|
||||||
|
EmailAddress1:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Primary email address
|
||||||
|
EmailAddress2:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Secondary email address
|
||||||
|
Phone:
|
||||||
|
type: string
|
||||||
|
description: Primary phone number
|
||||||
|
MobilePhone1:
|
||||||
|
type: string
|
||||||
|
description: Primary mobile number
|
||||||
|
MobilePhone2:
|
||||||
|
type: string
|
||||||
|
description: Secondary mobile number
|
||||||
|
Specialty:
|
||||||
|
type: string
|
||||||
|
description: Medical specialty code
|
||||||
|
SubSpecialty:
|
||||||
|
type: string
|
||||||
|
description: Sub-specialty code
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Contact 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'
|
||||||
|
|
||||||
|
patch:
|
||||||
|
tags: [Contacts]
|
||||||
|
summary: Update contact
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- ContactID
|
||||||
|
- NameFirst
|
||||||
|
properties:
|
||||||
|
ContactID:
|
||||||
|
type: integer
|
||||||
|
description: Contact ID to update
|
||||||
|
NameFirst:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
NameLast:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
Title:
|
||||||
|
type: string
|
||||||
|
description: Title (e.g., Dr, Mr, Mrs)
|
||||||
|
Initial:
|
||||||
|
type: string
|
||||||
|
description: Middle initial
|
||||||
|
Birthdate:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
description: Date of birth
|
||||||
|
EmailAddress1:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Primary email address
|
||||||
|
EmailAddress2:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
description: Secondary email address
|
||||||
|
Phone:
|
||||||
|
type: string
|
||||||
|
description: Primary phone number
|
||||||
|
MobilePhone1:
|
||||||
|
type: string
|
||||||
|
description: Primary mobile number
|
||||||
|
MobilePhone2:
|
||||||
|
type: string
|
||||||
|
description: Secondary mobile number
|
||||||
|
Specialty:
|
||||||
|
type: string
|
||||||
|
description: Medical specialty code
|
||||||
|
SubSpecialty:
|
||||||
|
type: string
|
||||||
|
description: Sub-specialty code
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Contact updated 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'
|
||||||
|
|
||||||
|
delete:
|
||||||
|
tags: [Contacts]
|
||||||
|
summary: Delete contact
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- ContactID
|
||||||
|
properties:
|
||||||
|
ContactID:
|
||||||
|
type: integer
|
||||||
|
description: Contact ID to delete
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Contact deleted successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '../components/schemas/common.yaml#/SuccessResponse'
|
||||||
|
|
||||||
|
/api/contact/{id}:
|
||||||
|
get:
|
||||||
|
tags: [Contacts]
|
||||||
|
summary: Get contact by ID
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: Contact ID
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Contact details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
$ref: '../components/schemas/master-data.yaml#/Contact'
|
||||||
190
public/paths/locations.yaml
Normal file
190
public/paths/locations.yaml
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
/api/location:
|
||||||
|
get:
|
||||||
|
tags: [Locations]
|
||||||
|
summary: List locations
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: LocCode
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Filter by location code
|
||||||
|
- name: LocName
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Filter by location name (searches in LocFull)
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of locations
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '../components/schemas/master-data.yaml#/Location'
|
||||||
|
|
||||||
|
post:
|
||||||
|
tags: [Locations]
|
||||||
|
summary: Create location
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- LocCode
|
||||||
|
- LocFull
|
||||||
|
properties:
|
||||||
|
SiteID:
|
||||||
|
type: integer
|
||||||
|
description: Reference to site
|
||||||
|
LocCode:
|
||||||
|
type: string
|
||||||
|
maxLength: 6
|
||||||
|
description: Location code (short identifier)
|
||||||
|
Parent:
|
||||||
|
type: integer
|
||||||
|
nullable: true
|
||||||
|
description: Parent location ID for hierarchical locations
|
||||||
|
LocFull:
|
||||||
|
type: string
|
||||||
|
maxLength: 255
|
||||||
|
description: Full location name
|
||||||
|
Description:
|
||||||
|
type: string
|
||||||
|
maxLength: 255
|
||||||
|
description: Location description
|
||||||
|
LocType:
|
||||||
|
type: string
|
||||||
|
description: Location type code (e.g., ROOM, WARD, BUILDING)
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Location 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'
|
||||||
|
|
||||||
|
patch:
|
||||||
|
tags: [Locations]
|
||||||
|
summary: Update location
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- LocationID
|
||||||
|
properties:
|
||||||
|
LocationID:
|
||||||
|
type: integer
|
||||||
|
description: Location ID to update
|
||||||
|
SiteID:
|
||||||
|
type: integer
|
||||||
|
description: Reference to site
|
||||||
|
LocCode:
|
||||||
|
type: string
|
||||||
|
maxLength: 6
|
||||||
|
description: Location code (short identifier)
|
||||||
|
Parent:
|
||||||
|
type: integer
|
||||||
|
nullable: true
|
||||||
|
description: Parent location ID for hierarchical locations
|
||||||
|
LocFull:
|
||||||
|
type: string
|
||||||
|
maxLength: 255
|
||||||
|
description: Full location name
|
||||||
|
Description:
|
||||||
|
type: string
|
||||||
|
maxLength: 255
|
||||||
|
description: Location description
|
||||||
|
LocType:
|
||||||
|
type: string
|
||||||
|
description: Location type code (e.g., ROOM, WARD, BUILDING)
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Location updated 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'
|
||||||
|
|
||||||
|
delete:
|
||||||
|
tags: [Locations]
|
||||||
|
summary: Delete location
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- LocationID
|
||||||
|
properties:
|
||||||
|
LocationID:
|
||||||
|
type: integer
|
||||||
|
description: Location ID to delete
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Location deleted successfully
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '../components/schemas/common.yaml#/SuccessResponse'
|
||||||
|
|
||||||
|
/api/location/{id}:
|
||||||
|
get:
|
||||||
|
tags: [Locations]
|
||||||
|
summary: Get location by ID
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: Location ID
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Location details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
$ref: '../components/schemas/master-data.yaml#/Location'
|
||||||
@ -1,59 +0,0 @@
|
|||||||
/api/location:
|
|
||||||
get:
|
|
||||||
tags: [Master Data]
|
|
||||||
summary: List locations
|
|
||||||
security:
|
|
||||||
- bearerAuth: []
|
|
||||||
parameters:
|
|
||||||
- name: LocCode
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
description: Filter by location code
|
|
||||||
- name: LocName
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
description: Filter by location name (searches in LocFull)
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: List of locations
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
status:
|
|
||||||
type: string
|
|
||||||
message:
|
|
||||||
type: string
|
|
||||||
data:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '../components/schemas/master-data.yaml#/Location'
|
|
||||||
|
|
||||||
post:
|
|
||||||
tags: [Master Data]
|
|
||||||
summary: Create location
|
|
||||||
security:
|
|
||||||
- bearerAuth: []
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- LocCode
|
|
||||||
- LocFull
|
|
||||||
properties:
|
|
||||||
SiteID:
|
|
||||||
type: integer
|
|
||||||
LocCode:
|
|
||||||
type: string
|
|
||||||
maxLength: 6
|
|
||||||
Parent:
|
|
||||||
type: integer
|
|
||||||
LocFull:
|
|
||||||
type: string
|
|
||||||
maxLength: 255
|
|
||||||
Loading…
x
Reference in New Issue
Block a user