diff --git a/public/api-docs.bundled.yaml b/public/api-docs.bundled.yaml index 75fc102..200194a 100644 --- a/public/api-docs.bundled.yaml +++ b/public/api-docs.bundled.yaml @@ -39,8 +39,10 @@ tags: description: Patient results reporting - name: Edge API description: Instrument integration endpoints - - name: Master Data - description: Lookup and reference data + - 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 @@ -214,6 +216,231 @@ paths: responses: '201': 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: get: tags: @@ -370,7 +597,7 @@ paths: /api/location: get: tags: - - Master Data + - Locations summary: List locations security: - bearerAuth: [] @@ -403,7 +630,7 @@ paths: $ref: '#/components/schemas/Location' post: tags: - - Master Data + - Locations summary: Create location security: - bearerAuth: [] @@ -419,14 +646,145 @@ paths: 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/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: get: tags: @@ -4056,69 +4414,3 @@ components: type: string format: date-time 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 diff --git a/public/api-docs.yaml b/public/api-docs.yaml index 378b662..f156941 100644 --- a/public/api-docs.yaml +++ b/public/api-docs.yaml @@ -41,8 +41,10 @@ tags: description: Patient results reporting - name: Edge API description: Instrument integration endpoints - - name: Master Data - description: Lookup and reference data + - 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 @@ -150,17 +152,9 @@ components: ValueSetItem: $ref: './components/schemas/valuesets.yaml#/ValueSetItem' - # Master Data schemas + # Locations schemas 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 # To view the complete API with all paths, use: api-docs.bundled.yaml diff --git a/public/paths/contact.yaml b/public/paths/contact.yaml new file mode 100644 index 0000000..cc820f5 --- /dev/null +++ b/public/paths/contact.yaml @@ -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' diff --git a/public/paths/locations.yaml b/public/paths/locations.yaml new file mode 100644 index 0000000..cf1c729 --- /dev/null +++ b/public/paths/locations.yaml @@ -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' diff --git a/public/paths/master-data.yaml b/public/paths/master-data.yaml deleted file mode 100644 index 430902e..0000000 --- a/public/paths/master-data.yaml +++ /dev/null @@ -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