Merge branch 'main' of https://git.shiblysolution.id/SAUDE-TL/service-master-data
This commit is contained in:
@ -248,12 +248,11 @@ export class ScheduleController {
|
|||||||
roomId: Joi.string().uuid().required(),
|
roomId: Joi.string().uuid().required(),
|
||||||
doctorId: Joi.string().uuid().required(),
|
doctorId: Joi.string().uuid().required(),
|
||||||
title: Joi.string().max(256).required(),
|
title: Joi.string().max(256).required(),
|
||||||
timezone: Joi.string().max(64).required(),
|
|
||||||
quota: Joi.number().integer().min(0).allow(null).optional(),
|
quota: Joi.number().integer().min(0).allow(null).optional(),
|
||||||
startDate: Joi.string().required(),
|
startDate: Joi.string().required(),
|
||||||
untilDate: Joi.string().allow("", null).optional(),
|
untilDate: Joi.string().allow("", null).optional(),
|
||||||
startTimeLocal: Joi.string().required(),
|
startTime: Joi.string().required(),
|
||||||
endTimeLocal: Joi.string().required(),
|
endTime: Joi.string().required(),
|
||||||
recurrence: Joi.object({
|
recurrence: Joi.object({
|
||||||
type: Joi.string().valid("daily", "weekly", "monthly").required(),
|
type: Joi.string().valid("daily", "weekly", "monthly").required(),
|
||||||
interval: Joi.number().min(1).optional(),
|
interval: Joi.number().min(1).optional(),
|
||||||
@ -292,12 +291,11 @@ export class ScheduleController {
|
|||||||
roomId: Joi.string().uuid().required(),
|
roomId: Joi.string().uuid().required(),
|
||||||
doctorId: Joi.string().uuid().required(),
|
doctorId: Joi.string().uuid().required(),
|
||||||
title: Joi.string().max(256).required(),
|
title: Joi.string().max(256).required(),
|
||||||
timezone: Joi.string().max(64).required(),
|
|
||||||
quota: Joi.number().integer().min(0).allow(null).optional(),
|
quota: Joi.number().integer().min(0).allow(null).optional(),
|
||||||
startDate: Joi.string().required(),
|
startDate: Joi.string().required(),
|
||||||
untilDate: Joi.string().allow("", null).optional(),
|
untilDate: Joi.string().allow("", null).optional(),
|
||||||
startTimeLocal: Joi.string().required(),
|
startTime: Joi.string().required(),
|
||||||
endTimeLocal: Joi.string().required(),
|
endTime: Joi.string().required(),
|
||||||
recurrence: Joi.object({
|
recurrence: Joi.object({
|
||||||
type: Joi.string().valid("daily", "weekly", "monthly").required(),
|
type: Joi.string().valid("daily", "weekly", "monthly").required(),
|
||||||
interval: Joi.number().min(1).optional(),
|
interval: Joi.number().min(1).optional(),
|
||||||
|
|||||||
@ -13,12 +13,11 @@ type ScheduleSeriesPayload = {
|
|||||||
roomId: string;
|
roomId: string;
|
||||||
doctorId: string;
|
doctorId: string;
|
||||||
title: string;
|
title: string;
|
||||||
timezone: string;
|
|
||||||
quota?: number | null;
|
quota?: number | null;
|
||||||
startDate: string;
|
startDate: string;
|
||||||
untilDate?: string | null;
|
untilDate?: string | null;
|
||||||
startTimeLocal: string;
|
startTime: string;
|
||||||
endTimeLocal: string;
|
endTime: string;
|
||||||
recurrence?: RecurrenceInput | null;
|
recurrence?: RecurrenceInput | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -112,8 +111,8 @@ export class ScheduleModel {
|
|||||||
const exception = exceptionMap.get(`${series.id}:${occurrenceYmd}`);
|
const exception = exceptionMap.get(`${series.id}:${occurrenceYmd}`);
|
||||||
if (exception && exception.is_cancelled) continue;
|
if (exception && exception.is_cancelled) continue;
|
||||||
|
|
||||||
const defaultStart = ScheduleModel.combineDateAndTime(occurrenceYmd, series.start_time_local);
|
const defaultStart = ScheduleModel.combineDateAndTime(occurrenceYmd, series.start_time);
|
||||||
const defaultEnd = ScheduleModel.combineDateAndTime(occurrenceYmd, series.end_time_local);
|
const defaultEnd = ScheduleModel.combineDateAndTime(occurrenceYmd, series.end_time);
|
||||||
|
|
||||||
const doctor = exception?.override_doctor ?? series.doctor;
|
const doctor = exception?.override_doctor ?? series.doctor;
|
||||||
const room = exception?.override_room ?? series.room;
|
const room = exception?.override_room ?? series.room;
|
||||||
@ -262,12 +261,11 @@ export class ScheduleModel {
|
|||||||
series.room = room;
|
series.room = room;
|
||||||
series.doctor = doctor;
|
series.doctor = doctor;
|
||||||
series.title = payload.title;
|
series.title = payload.title;
|
||||||
series.timezone = payload.timezone;
|
|
||||||
series.quota = payload.quota ?? null;
|
series.quota = payload.quota ?? null;
|
||||||
series.start_date = new Date(payload.startDate);
|
series.start_date = new Date(payload.startDate);
|
||||||
series.until_date = payload.untilDate ? new Date(payload.untilDate) : null;
|
series.until_date = payload.untilDate ? new Date(payload.untilDate) : null;
|
||||||
series.start_time_local = payload.startTimeLocal;
|
series.start_time = payload.startTime;
|
||||||
series.end_time_local = payload.endTimeLocal;
|
series.end_time = payload.endTime;
|
||||||
series.recurrence_rule = ScheduleModel.recurrenceToRRule(payload.recurrence || null);
|
series.recurrence_rule = ScheduleModel.recurrenceToRRule(payload.recurrence || null);
|
||||||
series.status = Status.Active;
|
series.status = Status.Active;
|
||||||
series.created_by = actor;
|
series.created_by = actor;
|
||||||
@ -295,12 +293,11 @@ export class ScheduleModel {
|
|||||||
series.room = room;
|
series.room = room;
|
||||||
series.doctor = doctor;
|
series.doctor = doctor;
|
||||||
series.title = payload.title;
|
series.title = payload.title;
|
||||||
series.timezone = payload.timezone;
|
|
||||||
series.quota = payload.quota ?? null;
|
series.quota = payload.quota ?? null;
|
||||||
series.start_date = new Date(payload.startDate);
|
series.start_date = new Date(payload.startDate);
|
||||||
series.until_date = payload.untilDate ? new Date(payload.untilDate) : null;
|
series.until_date = payload.untilDate ? new Date(payload.untilDate) : null;
|
||||||
series.start_time_local = payload.startTimeLocal;
|
series.start_time = payload.startTime;
|
||||||
series.end_time_local = payload.endTimeLocal;
|
series.end_time = payload.endTime;
|
||||||
series.recurrence_rule = ScheduleModel.recurrenceToRRule(payload.recurrence || null);
|
series.recurrence_rule = ScheduleModel.recurrenceToRRule(payload.recurrence || null);
|
||||||
series.updated_by = actor;
|
series.updated_by = actor;
|
||||||
|
|
||||||
|
|||||||
@ -2,504 +2,501 @@ const swaggerAutogen = require("swagger-autogen")({ openapi: "3.0.0" });
|
|||||||
const config = require("config");
|
const config = require("config");
|
||||||
|
|
||||||
const doc = {
|
const doc = {
|
||||||
info: {
|
info: {
|
||||||
title: config.get("app.name"),
|
title: config.get("app.name"),
|
||||||
description: config.get("app.description"),
|
description: config.get("app.description"),
|
||||||
version: config.get("app.version"),
|
version: config.get("app.version"),
|
||||||
},
|
},
|
||||||
servers: [
|
servers: [
|
||||||
{
|
{
|
||||||
url: config.get("server.host_swagger"),
|
url: config.get("server.host_swagger"),
|
||||||
description: "Environtment " + config.get("app.env"),
|
description: "Environtment " + config.get("app.env"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
components: {
|
components: {
|
||||||
schemas: {
|
schemas: {
|
||||||
product: {
|
product: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Product name",
|
$name: "Product name",
|
||||||
$description: "Product description",
|
$description: "Product description",
|
||||||
$source: "trialBalanceBranch / cifAccount / lnkolek",
|
$source: "trialBalanceBranch / cifAccount / lnkolek",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
branch: {
|
branch: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Branch name",
|
$name: "Branch name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
currency: {
|
currency: {
|
||||||
$name: "Dolar",
|
$name: "Dolar",
|
||||||
$symbol: "$",
|
$symbol: "$",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
inpatient_room: {
|
inpatient_room: {
|
||||||
$room_id: "34fdda87-9b42-44d3-8cab-2f2032481d42",
|
$room_id: "34fdda87-9b42-44d3-8cab-2f2032481d42",
|
||||||
$name: "Name",
|
$name: "Name",
|
||||||
$number_of_bed: 1,
|
$number_of_bed: 1,
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
$module: "Dashboard",
|
$module: "Dashboard",
|
||||||
$name: "Dashboard",
|
$name: "Dashboard",
|
||||||
$link: "/",
|
$link: "/",
|
||||||
$id_parent: "",
|
$id_parent: "",
|
||||||
$order_number: 1,
|
$order_number: 1,
|
||||||
$icon: "",
|
$icon: "",
|
||||||
$application: "ukln",
|
$application: "ukln",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
administrativu: {
|
administrativu: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Administrativu name",
|
$name: "Administrativu name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
$munisipo_id: "uuid-string",
|
$munisipo_id: "uuid-string",
|
||||||
},
|
},
|
||||||
application: {
|
application: {
|
||||||
$id: "ukln",
|
$id: "ukln",
|
||||||
$name: "Dashboard Performance Business",
|
$name: "Dashboard Performance Business",
|
||||||
$reset_password_url: "https://brilianapps.britimorleste.tl/ukln/auth/reset-password/",
|
$reset_password_url: "https://brilianapps.britimorleste.tl/ukln/auth/reset-password/",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
aldeia: {
|
aldeia: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Aldeia name",
|
$name: "Aldeia name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
$suco_id: "uuid-string",
|
$suco_id: "uuid-string",
|
||||||
},
|
},
|
||||||
class_economi: {
|
class_economi: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Class economi name",
|
$name: "Class economi name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
district: {
|
district: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "District name",
|
$name: "District name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
income_tier: {
|
income_tier: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Income tier name",
|
$name: "Income tier name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
munisipo: {
|
munisipo: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Munisipo name",
|
$name: "Munisipo name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
suco: {
|
suco: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Suco name",
|
$name: "Suco name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
$administrativu_id: "uuid-string",
|
$administrativu_id: "uuid-string",
|
||||||
},
|
},
|
||||||
nationality: {
|
nationality: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Nationality name",
|
$name: "Nationality name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
classEconomi: {
|
classEconomi: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Class Economi name",
|
$name: "Class Economi name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
incomeTier: {
|
incomeTier: {
|
||||||
$code: "123456",
|
$code: "123456",
|
||||||
$name: "Income Tier name",
|
$name: "Income Tier name",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
diagnosis: {
|
diagnosis: {
|
||||||
$diagnosis: "Diagnosis name (ICD-11)",
|
$diagnosis: "Diagnosis name (ICD-11)",
|
||||||
$code: "ABC123",
|
$code: "ABC123",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
diagnostic_procedure: {
|
diagnostic_procedure: {
|
||||||
$diagnosticProcedure: "Procedure name (ICD-9)",
|
$diagnosticProcedure: "Procedure name (ICD-9)",
|
||||||
$code: "XYZ789",
|
$code: "XYZ789",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
room: {
|
room: {
|
||||||
$room: "Room name",
|
$room: "Room name",
|
||||||
$code: "R001",
|
$code: "R001",
|
||||||
$description: "Optional description",
|
$description: "Optional description",
|
||||||
$department_id: "uuid-string",
|
$department_id: "uuid-string",
|
||||||
$serviceclass: "uuid-string",
|
$serviceclass: "uuid-string",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
$location: "Room location",
|
$location: "Room location",
|
||||||
$picture: "Room picture name",
|
$picture: "Room picture name",
|
||||||
},
|
},
|
||||||
laboratory: {
|
laboratory: {
|
||||||
$room: "Room name",
|
$room: "Room name",
|
||||||
$code: "R001",
|
$code: "R001",
|
||||||
$description: "Optional description",
|
$description: "Optional description",
|
||||||
$department_id: "uuid-string",
|
$department_id: "uuid-string",
|
||||||
$status: "Y",
|
$status: "Y",
|
||||||
},
|
},
|
||||||
// pharmacy: {
|
// pharmacy: {
|
||||||
// $room: "Room name",
|
// $room: "Room name",
|
||||||
// $code: "R001",
|
// $code: "R001",
|
||||||
// $description: "Optional description",
|
// $description: "Optional description",
|
||||||
// $department_id: "uuid-string",
|
// $department_id: "uuid-string",
|
||||||
// $status: "Y"
|
// $status: "Y"
|
||||||
// },
|
// },
|
||||||
serviceType: {
|
serviceType: {
|
||||||
$name: "Registration & Tickets",
|
$name: "Registration & Tickets",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
serviceClass: {
|
serviceClass: {
|
||||||
$name: "Class name",
|
$name: "Class name",
|
||||||
},
|
},
|
||||||
service: {
|
service: {
|
||||||
$name: "e.g. ER Registration",
|
$name: "e.g. ER Registration",
|
||||||
$service_type_id: "uuid-string",
|
$service_type_id: "uuid-string",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
roomServices: {
|
roomServices: {
|
||||||
$service_ids: ["uuid-string"],
|
$service_ids: ["uuid-string"],
|
||||||
},
|
},
|
||||||
serviceFare: {
|
serviceFare: {
|
||||||
$service_id: "uuid-string",
|
$service_id: "uuid-string",
|
||||||
$faretype: [
|
$faretype: [
|
||||||
{
|
{
|
||||||
$faretype_id: "uuid-string",
|
$faretype_id: "uuid-string",
|
||||||
$service_class: [
|
$service_class: [
|
||||||
{
|
{
|
||||||
$service_class_id: "uuid-string",
|
$service_class_id: "uuid-string",
|
||||||
$fare: 100000,
|
$fare: 100000,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
servicePackage: {
|
servicePackage: {
|
||||||
$name: "Package name",
|
$name: "Package name",
|
||||||
$service_class_id: "uuid-string",
|
$service_class_id: "uuid-string",
|
||||||
$fare: 500000,
|
$fare: 500000,
|
||||||
$service_ids: ["uuid-string"],
|
$service_ids: ["uuid-string"],
|
||||||
},
|
},
|
||||||
department: {
|
department: {
|
||||||
$name: "igd",
|
$name: "igd",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
doctorSchedule: {
|
doctorSchedule: {
|
||||||
$day: "Senin",
|
$day: "Senin",
|
||||||
$start_time: "08:00",
|
$start_time: "08:00",
|
||||||
$end_time: "12:00",
|
$end_time: "12:00",
|
||||||
$doctor_id: "uuid-string",
|
$doctor_id: "uuid-string",
|
||||||
$room_id: "uuid-string",
|
$room_id: "uuid-string",
|
||||||
$quota: "20",
|
$quota: "20",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
doctorItem: {
|
doctorItem: {
|
||||||
$doctor_id: "uuid-string",
|
$doctor_id: "uuid-string",
|
||||||
$item_master_id: "uuid-string",
|
$item_master_id: "uuid-string",
|
||||||
},
|
},
|
||||||
doctorItemPackage: {
|
doctorItemPackage: {
|
||||||
$doctor_id: "uuid-string",
|
$doctor_id: "uuid-string",
|
||||||
$name: "Paket Obat Harian",
|
$name: "Paket Obat Harian",
|
||||||
$description: "Optional description",
|
$description: "Optional description",
|
||||||
$item_master_ids: ["uuid-string"],
|
$item_master_ids: ["uuid-string"],
|
||||||
$active: true,
|
$active: true,
|
||||||
},
|
},
|
||||||
measurementUnit: {
|
measurementUnit: {
|
||||||
$unit: "Milligram",
|
$unit: "Milligram",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
referenceRange: {
|
referenceRange: {
|
||||||
$gender: { "@enum": ["male", "female"] },
|
$gender: { "@enum": ["male", "female"] },
|
||||||
$age_range_min: "0 | (days)",
|
$age_range_min: "0 | (days)",
|
||||||
$age_range_max: "20 | (days)",
|
$age_range_max: "20 | (days)",
|
||||||
$value_min: "13.7",
|
$value_min: "13.7",
|
||||||
$value_max: "17.5",
|
$value_max: "17.5",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
queueMonitoring: {
|
queueMonitoring: {
|
||||||
$name: "Ground Floor Queue",
|
$name: "Ground Floor Queue",
|
||||||
$slug: "ground-floor-queue",
|
$slug: "ground-floor-queue",
|
||||||
$room_ids: ["uuid-string"],
|
$room_ids: ["uuid-string"],
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
examinationType: {
|
examinationType: {
|
||||||
$name: "Examination Type name",
|
$name: "Examination Type name",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
$service_ids: ["uuid-string"],
|
$service_ids: ["uuid-string"],
|
||||||
},
|
},
|
||||||
examinationDetail: {
|
examinationDetail: {
|
||||||
$name: "Examination Detail name",
|
$name: "Examination Detail name",
|
||||||
$order_no: "Order number",
|
$order_no: "Order number",
|
||||||
$measurement_unit_id: "uuid-string",
|
$measurement_unit_id: "uuid-string",
|
||||||
$reference_range_ids: "[] array uuid-string",
|
$reference_range_ids: "[] array uuid-string",
|
||||||
$status: { "@enum": ["Y", "N"] },
|
$status: { "@enum": ["Y", "N"] },
|
||||||
},
|
},
|
||||||
serviceExamination: {
|
serviceExamination: {
|
||||||
$examination_detail_ids: ["uuid-string"],
|
$examination_detail_ids: ["uuid-string"],
|
||||||
},
|
},
|
||||||
serviceExaminationCreate: {
|
serviceExaminationCreate: {
|
||||||
$examination_detail_ids: ["uuid-string"],
|
$examination_detail_ids: ["uuid-string"],
|
||||||
$service_id: "uuid-string",
|
$service_id: "uuid-string",
|
||||||
},
|
},
|
||||||
hospitalinformation: {
|
hospitalinformation: {
|
||||||
$name: "Hospital Name",
|
$name: "Hospital Name",
|
||||||
$address: "Hospital Address",
|
$address: "Hospital Address",
|
||||||
$phone: "Hospital Phone",
|
$phone: "Hospital Phone",
|
||||||
$logo: "Hospital Logo",
|
$logo: "Hospital Logo",
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
$file_name: "File Name",
|
$file_name: "File Name",
|
||||||
},
|
},
|
||||||
item_group: {
|
item_group: {
|
||||||
$group_name: "ItemGroup name",
|
$group_name: "ItemGroup name",
|
||||||
},
|
},
|
||||||
item_origin: {
|
item_origin: {
|
||||||
$origin_name: "ItemOrigin name",
|
$origin_name: "ItemOrigin name",
|
||||||
$origin_description: "ItemOrigin Desc",
|
$origin_description: "ItemOrigin Desc",
|
||||||
$department: "Department name",
|
$department: "Department name",
|
||||||
$account: "Account name",
|
$account: "Account name",
|
||||||
},
|
},
|
||||||
item_type: {
|
item_type: {
|
||||||
$type_name: "ItemType name",
|
$type_name: "ItemType name",
|
||||||
$item_group_id: "ItemGroup Id",
|
$item_group_id: "ItemGroup Id",
|
||||||
},
|
},
|
||||||
item_type_detail: {
|
item_type_detail: {
|
||||||
$type_detail_name: "ItemTypeDetail name",
|
$type_detail_name: "ItemTypeDetail name",
|
||||||
$item_type_id: "ItemType Id",
|
$item_type_id: "ItemType Id",
|
||||||
},
|
},
|
||||||
unit: {
|
unit: {
|
||||||
$unit_name: "Unit name",
|
$unit_name: "Unit name",
|
||||||
$small_unit: "Small unit name",
|
$small_unit: "Small unit name",
|
||||||
$large_unit: "Large unit name",
|
$large_unit: "Large unit name",
|
||||||
},
|
},
|
||||||
item_category: {
|
item_category: {
|
||||||
$category_name: "ItemCategory name",
|
$category_name: "ItemCategory name",
|
||||||
},
|
},
|
||||||
item_status: {
|
item_status: {
|
||||||
$status_name: "Itemstatus name",
|
$status_name: "Itemstatus name",
|
||||||
},
|
},
|
||||||
item_class: {
|
item_class: {
|
||||||
$item_class_name: "ItemClass name",
|
$item_class_name: "ItemClass name",
|
||||||
},
|
},
|
||||||
item_class_detail: {
|
item_class_detail: {
|
||||||
$class_detail_name: "ItemClassDetail name",
|
$class_detail_name: "ItemClassDetail name",
|
||||||
},
|
},
|
||||||
usage_instructions: {
|
usage_instructions: {
|
||||||
$usage_instructions_name: "UsageInstructions name",
|
$usage_instructions_name: "UsageInstructions name",
|
||||||
$usage_instructions_abbreviation: "UsageInstructions Abbreviation",
|
$usage_instructions_abbreviation: "UsageInstructions Abbreviation",
|
||||||
},
|
},
|
||||||
usage_time: {
|
usage_time: {
|
||||||
$usage_time_name: "UsageInstructions name",
|
$usage_time_name: "UsageInstructions name",
|
||||||
$usage_time_abbreviation: "UsageInstructions Abbreviation",
|
$usage_time_abbreviation: "UsageInstructions Abbreviation",
|
||||||
},
|
},
|
||||||
generic_name: {
|
generic_name: {
|
||||||
$generic_name: "Generic name",
|
$generic_name: "Generic name",
|
||||||
},
|
},
|
||||||
factory: {
|
factory: {
|
||||||
$factory_name: "factory name",
|
$factory_name: "factory name",
|
||||||
$address: "Factory address",
|
$address: "Factory address",
|
||||||
$web: "Factory url web",
|
$web: "Factory url web",
|
||||||
$phone: "Factory phone",
|
$phone: "Factory phone",
|
||||||
$email: "Factory email",
|
$email: "Factory email",
|
||||||
},
|
},
|
||||||
supplier: {
|
supplier: {
|
||||||
$supplier_name: "supplier name",
|
$supplier_name: "supplier name",
|
||||||
$address: "supplier address",
|
$address: "supplier address",
|
||||||
$phone: "supplier phone",
|
$phone: "supplier phone",
|
||||||
$email: "supplier email",
|
$email: "supplier email",
|
||||||
},
|
},
|
||||||
factory_to_supplier: {
|
factory_to_supplier: {
|
||||||
$supplier_id: "Supplier ID (required, UUID)",
|
$supplier_id: "Supplier ID (required, UUID)",
|
||||||
$factory_ids: "Array [factory-uuid-1, factory-uuid-2]",
|
$factory_ids: "Array [factory-uuid-1, factory-uuid-2]",
|
||||||
},
|
},
|
||||||
item_master: {
|
item_master: {
|
||||||
$item_name: "Item name",
|
$item_name: "Item name",
|
||||||
$generic_name_id: "Generic name ID (UUID)",
|
$generic_name_id: "Generic name ID (UUID)",
|
||||||
$item_type_detail_id: "Item type detail ID (UUID)",
|
$item_type_detail_id: "Item type detail ID (UUID)",
|
||||||
$item_category_id: "Item category ID (UUID)",
|
$item_category_id: "Item category ID (UUID)",
|
||||||
$item_class_id: "Item class ID (UUID)",
|
$item_class_id: "Item class ID (UUID)",
|
||||||
$item_class_detail_id: "Item class Detail ID (UUID)",
|
$item_class_detail_id: "Item class Detail ID (UUID)",
|
||||||
$item_status_id: "Item status ID (UUID)",
|
$item_status_id: "Item status ID (UUID)",
|
||||||
$factory_id: "Factory ID (UUID)",
|
$factory_id: "Factory ID (UUID)",
|
||||||
// $unit_id: "Unit ID (UUID)",
|
// $unit_id: "Unit ID (UUID)",
|
||||||
$smallunit: "string",
|
$smallunit: "string",
|
||||||
$largeunit: "string",
|
$largeunit: "string",
|
||||||
$pack_size: "Pack size (integer, minimum 0)",
|
$pack_size: "Pack size (integer, minimum 0)",
|
||||||
$minimum_quantity: "Minimum quantity (integer, minimum 0)",
|
$minimum_quantity: "Minimum quantity (integer, minimum 0)",
|
||||||
$minimum_sales_quantity: "Minimum sales quantity (integer, minimum 0)",
|
$minimum_sales_quantity: "Minimum sales quantity (integer, minimum 0)",
|
||||||
$strength: "Strength value (number, minimum 0)",
|
$strength: "Strength value (number, minimum 0)",
|
||||||
$active: "Active status (boolean)",
|
$active: "Active status (boolean)",
|
||||||
},
|
},
|
||||||
pharmacy_info: {
|
pharmacy_info: {
|
||||||
$logo: "Logo (string, max 256)",
|
$logo: "Logo (string, max 256)",
|
||||||
$name: "Name (string, max 256)",
|
$name: "Name (string, max 256)",
|
||||||
$address: "Address (string, max 500)",
|
$address: "Address (string, max 500)",
|
||||||
$munisipiu: "Munisipiu ID (UUID)",
|
$munisipiu: "Munisipiu ID (UUID)",
|
||||||
$postu_admin: "Postu Admin ID (UUID)",
|
$postu_admin: "Postu Admin ID (UUID)",
|
||||||
$suco: "Suco ID (UUID)",
|
$suco: "Suco ID (UUID)",
|
||||||
$aldeia: "Aldeia ID (UUID)",
|
$aldeia: "Aldeia ID (UUID)",
|
||||||
$phone: "Phone (string, max 30, optional)",
|
$phone: "Phone (string, max 30, optional)",
|
||||||
$default_room_id: "Default Room ID (UUID)",
|
$default_room_id: "Default Room ID (UUID)",
|
||||||
$province: "Province Code",
|
$province: "Province Code",
|
||||||
$city: "City Code",
|
$city: "City Code",
|
||||||
$subdistrict: "Subdistrict Code",
|
$subdistrict: "Subdistrict Code",
|
||||||
$ward: "Ward Code",
|
$ward: "Ward Code",
|
||||||
},
|
},
|
||||||
item_price: {
|
item_price: {
|
||||||
$item_master_id: "Item Master ID (required, UUID)",
|
$item_master_id: "Item Master ID (required, UUID)",
|
||||||
$purchase_price: "Purchase Price (required, number, minimum 0)",
|
$purchase_price: "Purchase Price (required, number, minimum 0)",
|
||||||
$selling_price: "Selling Price (required, number, minimum 0)",
|
$selling_price: "Selling Price (required, number, minimum 0)",
|
||||||
$expired_date: "Expired Date (required, date)",
|
$expired_date: "Expired Date (required, date)",
|
||||||
},
|
},
|
||||||
initial_stock: {
|
initial_stock: {
|
||||||
$itemmaster: "Item Master uuid",
|
$itemmaster: "Item Master uuid",
|
||||||
$room: "Room uuid",
|
$room: "Room uuid",
|
||||||
$itemorigin: "Item Origin uuid",
|
$itemorigin: "Item Origin uuid",
|
||||||
$batch: "Batch",
|
$batch: "Batch",
|
||||||
$exp_date: "Exp Date",
|
$exp_date: "Exp Date",
|
||||||
$stock: "Stock",
|
$stock: "Stock",
|
||||||
},
|
},
|
||||||
selling_price_percentage: {
|
selling_price_percentage: {
|
||||||
$item_master_id: "Item Master ID (required, UUID)",
|
$item_master_id: "Item Master ID (required, UUID)",
|
||||||
$item_origin_id: "Item Origin ID (required, UUID)",
|
$item_origin_id: "Item Origin ID (required, UUID)",
|
||||||
$percentage: "Percentage (required, number, min 0, max 999.99, 2 decimal places)",
|
$percentage: "Percentage (required, number, min 0, max 999.99, 2 decimal places)",
|
||||||
},
|
},
|
||||||
patient_group: {
|
patient_group: {
|
||||||
$patient_group_name: "PatientGroup name",
|
$patient_group_name: "PatientGroup name",
|
||||||
},
|
},
|
||||||
patient_guarantor: {
|
patient_guarantor: {
|
||||||
$guarantor_name: "PatientGuarantor name",
|
$guarantor_name: "PatientGuarantor name",
|
||||||
$phone: "08123456789", // Nomor telepon
|
$phone: "08123456789", // Nomor telepon
|
||||||
$province: "West Java", // Provinsi
|
$province: "West Java", // Provinsi
|
||||||
$city: "Bandung", // Kota
|
$city: "Bandung", // Kota
|
||||||
$zip_code: "40123", // Kode Pos
|
$zip_code: "40123", // Kode Pos
|
||||||
$agreement_no: "AG123456789", // Nomor Perjanjian
|
$agreement_no: "AG123456789", // Nomor Perjanjian
|
||||||
$agreement_desc: "Health Insurance Agreement", // Deskripsi Perjanjian (opsional)
|
$agreement_desc: "Health Insurance Agreement", // Deskripsi Perjanjian (opsional)
|
||||||
$patient_group_id: "2e1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Patient Group (UUID)
|
$patient_group_id: "2e1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Patient Group (UUID)
|
||||||
$faretype: "3f1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Fare Type (UUID)
|
$faretype: "3f1a1b33-bbb2-4f33-b2c4-cff5976f3f95", // Fare Type (UUID)
|
||||||
$maximalliability: 1000000, // Maximal Liability (opsional)
|
$maximalliability: 1000000, // Maximal Liability (opsional)
|
||||||
},
|
},
|
||||||
refferal_hospital: {
|
refferal_hospital: {
|
||||||
$refferal_hospital_name: "RefferalHospital name",
|
$refferal_hospital_name: "RefferalHospital name",
|
||||||
},
|
},
|
||||||
user_to_room: {
|
user_to_room: {
|
||||||
$user_id: "user ID (required, UUID)",
|
$user_id: "user ID (required, UUID)",
|
||||||
$room_id: "Room ID (required, UUID)",
|
$room_id: "Room ID (required, UUID)",
|
||||||
},
|
},
|
||||||
user_to_room_update: {
|
user_to_room_update: {
|
||||||
$user_id: "user ID (required, UUID)",
|
$user_id: "user ID (required, UUID)",
|
||||||
$room_ids: "Array [room-uuid-1, room-uuid-2]",
|
$room_ids: "Array [room-uuid-1, room-uuid-2]",
|
||||||
},
|
},
|
||||||
room_to_pharmacy: {
|
room_to_pharmacy: {
|
||||||
$room_id: "room ID (required, UUID)",
|
$room_id: "room ID (required, UUID)",
|
||||||
$pharmacy_room_id: "Pharmacy Room ID (required, UUID)",
|
$pharmacy_room_id: "Pharmacy Room ID (required, UUID)",
|
||||||
},
|
},
|
||||||
planning_verificator: {
|
planning_verificator: {
|
||||||
$user_id: "User ID (required, UUID)",
|
$user_id: "User ID (required, UUID)",
|
||||||
},
|
},
|
||||||
scheduleRecurrence: {
|
scheduleRecurrence: {
|
||||||
$type: { "@enum": ["daily", "weekly", "monthly"] },
|
$type: { "@enum": ["daily", "weekly", "monthly"] },
|
||||||
$interval: 1,
|
$interval: 1,
|
||||||
$daysOfWeek: ["MO", "WE", "FR"],
|
$daysOfWeek: ["MO", "WE", "FR"],
|
||||||
},
|
},
|
||||||
scheduleSeriesCreate: {
|
scheduleSeriesCreate: {
|
||||||
$roomId: "uuid-string",
|
$roomId: "uuid-string",
|
||||||
$doctorId: "uuid-string",
|
$doctorId: "uuid-string",
|
||||||
$title: "Practice Schedule",
|
$title: "Practice Schedule",
|
||||||
$timezone: "Asia/Jakarta",
|
$quota: 20,
|
||||||
$quota: 20,
|
$startDate: "2026-03-20",
|
||||||
$startDate: "2026-03-20",
|
$untilDate: "2026-06-30",
|
||||||
$untilDate: "2026-06-30",
|
$startTime: "09:00:00",
|
||||||
$startTimeLocal: "09:00:00",
|
$endTime: "12:00:00",
|
||||||
$endTimeLocal: "12:00:00",
|
$recurrence: { $ref: "#/components/schemas/scheduleRecurrence" },
|
||||||
$recurrence: { $ref: "#/components/schemas/scheduleRecurrence" },
|
},
|
||||||
},
|
scheduleSeriesUpdate: {
|
||||||
scheduleSeriesUpdate: {
|
$roomId: "uuid-string",
|
||||||
$roomId: "uuid-string",
|
$doctorId: "uuid-string",
|
||||||
$doctorId: "uuid-string",
|
$title: "Practice Schedule Updated",
|
||||||
$title: "Practice Schedule Updated",
|
$quota: 25,
|
||||||
$timezone: "Asia/Jakarta",
|
$startDate: "2026-03-20",
|
||||||
$quota: 25,
|
$untilDate: "2026-07-31",
|
||||||
$startDate: "2026-03-20",
|
$startTime: "10:00:00",
|
||||||
$untilDate: "2026-07-31",
|
$endTime: "13:00:00",
|
||||||
$startTimeLocal: "10:00:00",
|
$recurrence: { $ref: "#/components/schemas/scheduleRecurrence" },
|
||||||
$endTimeLocal: "13:00:00",
|
},
|
||||||
$recurrence: { $ref: "#/components/schemas/scheduleRecurrence" },
|
scheduleSeriesDetail: {
|
||||||
},
|
$id: "uuid-string",
|
||||||
scheduleSeriesDetail: {
|
$room_id: "uuid-string",
|
||||||
$id: "uuid-string",
|
$doctor_id: "uuid-string",
|
||||||
$room_id: "uuid-string",
|
$title: "Practice Schedule",
|
||||||
$doctor_id: "uuid-string",
|
$quota: 20,
|
||||||
$title: "Practice Schedule",
|
$start_date: "2026-03-20",
|
||||||
$timezone: "Asia/Jakarta",
|
$until_date: "2026-06-30",
|
||||||
$quota: 20,
|
$start_time: "09:00:00",
|
||||||
$start_date: "2026-03-20",
|
$end_time: "12:00:00",
|
||||||
$until_date: "2026-06-30",
|
$recurrence: { $ref: "#/components/schemas/scheduleRecurrence" },
|
||||||
$start_time_local: "09:00:00",
|
$status: "Active",
|
||||||
$end_time_local: "12:00:00",
|
$room: { id: "uuid-string", room: "Room 1" },
|
||||||
$recurrence: { $ref: "#/components/schemas/scheduleRecurrence" },
|
$doctor: { id: "uuid-string", name: "Dr A" },
|
||||||
$status: "Active",
|
},
|
||||||
$room: { id: "uuid-string", room: "Room 1" },
|
scheduleExceptionCreate: {
|
||||||
$doctor: { id: "uuid-string", name: "Dr A" },
|
$occurrenceDate: "2026-03-24",
|
||||||
},
|
$isCancelled: false,
|
||||||
scheduleExceptionCreate: {
|
$overrideRoomId: "uuid-string",
|
||||||
$occurrenceDate: "2026-03-24",
|
$overrideDoctorId: "uuid-string",
|
||||||
$isCancelled: false,
|
$overrideTitle: "Override Practice",
|
||||||
$overrideRoomId: "uuid-string",
|
$overrideStartAt: "2026-03-24T10:00:00.000Z",
|
||||||
$overrideDoctorId: "uuid-string",
|
$overrideEndAt: "2026-03-24T12:30:00.000Z",
|
||||||
$overrideTitle: "Override Practice",
|
},
|
||||||
$overrideStartAt: "2026-03-24T10:00:00.000Z",
|
scheduleCalendarResource: {
|
||||||
$overrideEndAt: "2026-03-24T12:30:00.000Z",
|
$id: "room-1:doctor-1",
|
||||||
},
|
$roomId: "room-1",
|
||||||
scheduleCalendarResource: {
|
$roomName: "Room 1",
|
||||||
$id: "room-1:doctor-1",
|
$doctorId: "doctor-1",
|
||||||
$roomId: "room-1",
|
$doctorName: "Dr A",
|
||||||
$roomName: "Room 1",
|
},
|
||||||
$doctorId: "doctor-1",
|
scheduleCalendarEvent: {
|
||||||
$doctorName: "Dr A",
|
$id: "occ:series-101:2026-03-20",
|
||||||
},
|
$seriesId: "series-101",
|
||||||
scheduleCalendarEvent: {
|
$resourceId: "room-1:doctor-1",
|
||||||
$id: "occ:series-101:2026-03-20",
|
$title: "Practice",
|
||||||
$seriesId: "series-101",
|
$startAt: "2026-03-20T09:00:00+07:00",
|
||||||
$resourceId: "room-1:doctor-1",
|
$endAt: "2026-03-20T12:00:00+07:00",
|
||||||
$title: "Practice",
|
$quota: 20,
|
||||||
$startAt: "2026-03-20T09:00:00+07:00",
|
$usedQuota: 7,
|
||||||
$endAt: "2026-03-20T12:00:00+07:00",
|
$leftQuota: 13,
|
||||||
$quota: 20,
|
$isRecurring: true,
|
||||||
$usedQuota: 7,
|
$isException: false,
|
||||||
$leftQuota: 13,
|
$status: "confirmed",
|
||||||
$isRecurring: true,
|
},
|
||||||
$isException: false,
|
scheduleCalendarMeta: {
|
||||||
$status: "confirmed",
|
$total_count: 24,
|
||||||
},
|
$page: 1,
|
||||||
scheduleCalendarMeta: {
|
$limit: 20,
|
||||||
$total_count: 24,
|
},
|
||||||
$page: 1,
|
faretype: {
|
||||||
$limit: 20,
|
$name: "Name (string)",
|
||||||
},
|
},
|
||||||
faretype: {
|
card_type: {
|
||||||
$name: "Name (string)",
|
$name: "Name (string)",
|
||||||
},
|
},
|
||||||
card_type: {
|
payment_method: {
|
||||||
$name: "Name (string)",
|
$name: "Name (string)",
|
||||||
},
|
},
|
||||||
payment_method: {
|
registration_fee: {
|
||||||
$name: "Name (string)",
|
type: "emergency | outpatient",
|
||||||
},
|
service: ["uuid-string-1", "uuid-string-2"],
|
||||||
registration_fee: {
|
},
|
||||||
type: "emergency | outpatient",
|
serviceFareUpdate: {
|
||||||
service: ["uuid-string-1", "uuid-string-2"],
|
$fare: 100000,
|
||||||
},
|
},
|
||||||
serviceFareUpdate: {
|
responsiblepartyconsent: {
|
||||||
$fare: 100000,
|
$bodytext: "string",
|
||||||
},
|
},
|
||||||
responsiblepartyconsent: {
|
},
|
||||||
$bodytext: "string",
|
parameters: {},
|
||||||
},
|
securitySchemes: {
|
||||||
},
|
bearerAuth: {
|
||||||
parameters: {},
|
type: "http",
|
||||||
securitySchemes: {
|
scheme: "bearer",
|
||||||
bearerAuth: {
|
},
|
||||||
type: "http",
|
},
|
||||||
scheme: "bearer",
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const outputFile = "./swagger.json";
|
const outputFile = "./swagger.json";
|
||||||
|
|||||||
Reference in New Issue
Block a user