This commit is contained in:
@@ -130,13 +130,8 @@ definitions:
|
||||
api-service_internal_models_kiosk.ListkioskCreateRequest:
|
||||
properties:
|
||||
active:
|
||||
enum:
|
||||
- true
|
||||
- false
|
||||
type: boolean
|
||||
ds_sd_location:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
fk_ref_healthcare_type_id:
|
||||
minimum: 1
|
||||
@@ -145,7 +140,6 @@ definitions:
|
||||
minimum: 1
|
||||
type: integer
|
||||
fk_sd_location_id:
|
||||
minLength: 1
|
||||
type: string
|
||||
icon:
|
||||
maxLength: 20
|
||||
@@ -190,13 +184,9 @@ definitions:
|
||||
api-service_internal_models_kiosk.ListkioskUpdateRequest:
|
||||
properties:
|
||||
active:
|
||||
enum:
|
||||
- true
|
||||
- false
|
||||
type: boolean
|
||||
ds_sd_location:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
fk_ref_healthcare_type_id:
|
||||
minimum: 1
|
||||
@@ -205,7 +195,6 @@ definitions:
|
||||
minimum: 1
|
||||
type: integer
|
||||
fk_sd_location_id:
|
||||
minLength: 1
|
||||
type: string
|
||||
icon:
|
||||
maxLength: 20
|
||||
@@ -232,6 +221,184 @@ definitions:
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
api-service_internal_models_patient.Patient:
|
||||
properties:
|
||||
active:
|
||||
$ref: '#/definitions/sql.NullBool'
|
||||
address:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
birth_date:
|
||||
type: string
|
||||
ds_sd_kabupaten_kota:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
ds_sd_kecamatan:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
ds_sd_kelurahan:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
ds_sd_provinsi:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
fk_sd_kabupaten_kota_id:
|
||||
$ref: '#/definitions/api-service_internal_models.NullableInt32'
|
||||
fk_sd_kecamatan_id:
|
||||
$ref: '#/definitions/api-service_internal_models.NullableInt32'
|
||||
fk_sd_kelurahan_id:
|
||||
$ref: '#/definitions/api-service_internal_models.NullableInt32'
|
||||
fk_sd_provinsi_id:
|
||||
$ref: '#/definitions/api-service_internal_models.NullableInt32'
|
||||
gender:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
id:
|
||||
type: integer
|
||||
medical_record_number:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
name:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
phone_number:
|
||||
$ref: '#/definitions/sql.NullString'
|
||||
type: object
|
||||
api-service_internal_models_patient.PatientCreateRequest:
|
||||
properties:
|
||||
active:
|
||||
type: boolean
|
||||
address:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
birth_date:
|
||||
type: string
|
||||
ds_sd_kabupaten_kota:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
ds_sd_kecamatan:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
ds_sd_kelurahan:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
ds_sd_provinsi:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
fk_sd_kabupaten_kota_id:
|
||||
type: integer
|
||||
fk_sd_kecamatan_id:
|
||||
type: integer
|
||||
fk_sd_kelurahan_id:
|
||||
type: integer
|
||||
fk_sd_provinsi_id:
|
||||
type: integer
|
||||
gender:
|
||||
maxLength: 1
|
||||
type: string
|
||||
medical_record_number:
|
||||
maxLength: 20
|
||||
minLength: 1
|
||||
type: string
|
||||
name:
|
||||
maxLength: 100
|
||||
minLength: 1
|
||||
type: string
|
||||
phone_number:
|
||||
maxLength: 20
|
||||
minLength: 1
|
||||
type: string
|
||||
type: object
|
||||
api-service_internal_models_patient.PatientCreateResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.Patient'
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
api-service_internal_models_patient.PatientDeleteResponse:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
api-service_internal_models_patient.PatientGetResponse:
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.Patient'
|
||||
type: array
|
||||
message:
|
||||
type: string
|
||||
meta:
|
||||
$ref: '#/definitions/api-service_internal_models.MetaResponse'
|
||||
summary:
|
||||
$ref: '#/definitions/api-service_internal_models.AggregateData'
|
||||
type: object
|
||||
api-service_internal_models_patient.PatientPostRequest:
|
||||
properties:
|
||||
id:
|
||||
minimum: 1
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
api-service_internal_models_patient.PatientUpdateRequest:
|
||||
properties:
|
||||
active:
|
||||
type: boolean
|
||||
address:
|
||||
maxLength: 255
|
||||
minLength: 1
|
||||
type: string
|
||||
birth_date:
|
||||
type: string
|
||||
ds_sd_kabupaten_kota:
|
||||
maxLength: 255
|
||||
type: string
|
||||
ds_sd_kecamatan:
|
||||
maxLength: 255
|
||||
type: string
|
||||
ds_sd_kelurahan:
|
||||
maxLength: 255
|
||||
type: string
|
||||
ds_sd_provinsi:
|
||||
maxLength: 255
|
||||
type: string
|
||||
fk_sd_kabupaten_kota_id:
|
||||
type: integer
|
||||
fk_sd_kecamatan_id:
|
||||
type: integer
|
||||
fk_sd_kelurahan_id:
|
||||
type: integer
|
||||
fk_sd_provinsi_id:
|
||||
type: integer
|
||||
gender:
|
||||
maxLength: 1
|
||||
type: string
|
||||
id:
|
||||
minimum: 1
|
||||
type: integer
|
||||
medical_record_number:
|
||||
maxLength: 20
|
||||
minLength: 1
|
||||
type: string
|
||||
name:
|
||||
maxLength: 100
|
||||
minLength: 1
|
||||
type: string
|
||||
phone_number:
|
||||
maxLength: 20
|
||||
minLength: 1
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
api-service_internal_models_patient.PatientUpdateResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.Patient'
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
api-service_internal_models_retribusi.Retribusi:
|
||||
properties:
|
||||
createdAt:
|
||||
@@ -822,6 +989,30 @@ paths:
|
||||
summary: Get listkiosk statistics
|
||||
tags:
|
||||
- Listkiosk
|
||||
/api/v1/patients/stats:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns comprehensive statistics about patient data
|
||||
parameters:
|
||||
- description: Filter statistics by status
|
||||
in: query
|
||||
name: status
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Statistics data
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.AggregateData'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
summary: Get patient statistics
|
||||
tags:
|
||||
- Patient
|
||||
/api/v1/retribusi/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
@@ -1292,6 +1483,188 @@ paths:
|
||||
summary: Get listkiosk with pagination and optional aggregation
|
||||
tags:
|
||||
- Listkiosk
|
||||
/patient:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Creates a new patient record
|
||||
parameters:
|
||||
- description: Patient creation request
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientCreateRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"201":
|
||||
description: Patient created successfully
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientCreateResponse'
|
||||
"400":
|
||||
description: Bad request or validation error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
summary: Create patient
|
||||
tags:
|
||||
- Patient
|
||||
/patient/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Soft deletes a patient by setting status to 'deleted'
|
||||
parameters:
|
||||
- description: Patient ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Patient deleted successfully
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientDeleteResponse'
|
||||
"400":
|
||||
description: Invalid ID format
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"404":
|
||||
description: Patient not found
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
summary: Delete patient
|
||||
tags:
|
||||
- Patient
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Updates an existing patient record
|
||||
parameters:
|
||||
- description: Patient ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: Patient update request
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientUpdateRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Patient updated successfully
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientUpdateResponse'
|
||||
"400":
|
||||
description: Bad request or validation error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"404":
|
||||
description: Patient not found
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
summary: Update patient
|
||||
tags:
|
||||
- Patient
|
||||
/patient/detail:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Retrieves a patient record by ID using POST request
|
||||
parameters:
|
||||
- description: Patient post request
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientPostRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Patient details retrieved successfully
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientCreateResponse'
|
||||
"400":
|
||||
description: Bad request or validation error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"404":
|
||||
description: Patient not found
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
summary: Get patient by ID using POST request
|
||||
tags:
|
||||
- Patient
|
||||
/patient/listpatient:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns a paginated list of patients with optional summary statistics
|
||||
parameters:
|
||||
- default: 10
|
||||
description: Limit (max 100)
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- default: 0
|
||||
description: Offset
|
||||
in: query
|
||||
name: offset
|
||||
type: integer
|
||||
- default: false
|
||||
description: Include aggregation summary
|
||||
in: query
|
||||
name: include_summary
|
||||
type: boolean
|
||||
- description: Filter by status
|
||||
in: query
|
||||
name: status
|
||||
type: string
|
||||
- description: Search in multiple fields
|
||||
in: query
|
||||
name: search
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Success response
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models_patient.PatientGetResponse'
|
||||
"400":
|
||||
description: Bad request
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/api-service_internal_models.ErrorResponse'
|
||||
summary: Get patient with pagination and optional aggregation
|
||||
tags:
|
||||
- Patient
|
||||
schemes:
|
||||
- http
|
||||
- https
|
||||
|
||||
Reference in New Issue
Block a user