clqms-be/public/paths/contact.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

225 lines
6.2 KiB
YAML

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