Commit 4bee9a03 authored by Indra Raja's avatar Indra Raja

Merge branch 'Volume1.1' into 'v1.3'

# Conflicts:
#   module/Application/src/Controller/ApiController.php
#   module/Application/view/application/admin/antrianadmin.phtml
#   module/Application/view/application/admin/registrasidokter.phtml
#   public/action-js/antrian-js/action-admin.js
#   public/action-js/antrian-js/action-registrasidokter.js
parents 5e8d4410 1b1e00d1
/*
PostgreSQL Backup
Database: antrian/public
Backup Time: 2020-11-05 16:42:11
*/
DROP SEQUENCE IF EXISTS "public"."dokter\_id_dokter_seq";
DROP SEQUENCE IF EXISTS "public"."id_antrian_pasien_seq";
DROP SEQUENCE IF EXISTS "public"."id_antrian_seq";
DROP SEQUENCE IF EXISTS "public"."id_dokter_seq";
DROP SEQUENCE IF EXISTS "public"."id_register_antrian_seq";
DROP SEQUENCE IF EXISTS "public"."id_register_dokter_seq";
DROP SEQUENCE IF EXISTS "public"."id_ruang_seq";
DROP SEQUENCE IF EXISTS "public"."no_rekam_medis";
DROP SEQUENCE IF EXISTS "public"."pasien_id_pasien_seq";
DROP SEQUENCE IF EXISTS "public"."poli_id_poli_seq";
DROP SEQUENCE IF EXISTS "public"."user_data_header_iduser_seq1";
DROP SEQUENCE IF EXISTS "public"."user_data_header_iduser_seq";
DROP TABLE IF EXISTS "public"."antrian";
DROP TABLE IF EXISTS "public"."antrian_pasien";
DROP TABLE IF EXISTS "public"."condition";
DROP TABLE IF EXISTS "public"."counter_status";
DROP TABLE IF EXISTS "public"."divisi_witel";
DROP TABLE IF EXISTS "public"."dokter";
DROP TABLE IF EXISTS "public"."dokter_to_poli";
DROP TABLE IF EXISTS "public"."master_parameter";
DROP TABLE IF EXISTS "public"."pasien";
DROP TABLE IF EXISTS "public"."poli";
DROP TABLE IF EXISTS "public"."register_antrian";
DROP TABLE IF EXISTS "public"."register_dokter";
DROP TABLE IF EXISTS "public"."ruang";
DROP TABLE IF EXISTS "public"."user_data_access";
DROP TABLE IF EXISTS "public"."user_data_header";
DROP TABLE IF EXISTS "public"."user_data_map";
DROP TABLE IF EXISTS "public"."user_data_role";
DROP TABLE IF EXISTS "public"."user_data_session";
DROP FUNCTION IF EXISTS "public"."get_antrian_self()";
DROP FUNCTION IF EXISTS "public"."get_antriann(kode_antrian int4)";
DROP FUNCTION IF EXISTS "public"."get_film_count(len_from int4, len_to int4)";
DROP FUNCTION IF EXISTS "public"."get_no_mobile()";
DROP FUNCTION IF EXISTS "public"."get_no_web()";
DROP FUNCTION IF EXISTS "public"."insert_data(input_id_pasien int4, input_id_poli int4)";
CREATE SEQUENCE "dokter\_id_dokter_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 32767
START 1
CACHE 1;
CREATE SEQUENCE "id_antrian_pasien_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE SEQUENCE "id_antrian_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 999999999999999999
START 1
CACHE 1;
CREATE SEQUENCE "id_dokter_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1
CYCLE ;
CREATE SEQUENCE "id_register_antrian_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9999999999999999
START 1
CACHE 1;
CREATE SEQUENCE "id_register_dokter_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9999999999999999
START 1
CACHE 1;
CREATE SEQUENCE "id_ruang_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE SEQUENCE "no_rekam_medis"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE SEQUENCE "pasien_id_pasien_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE SEQUENCE "poli_id_poli_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 32767
START 1
CACHE 1;
CREATE SEQUENCE "user_data_header_iduser_seq1"
INCREMENT 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1;
CREATE SEQUENCE "user_data_header_iduser_seq"
INCREMENT 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1;
CREATE TABLE "antrian" (
"id_antrian" int2 NOT NULL DEFAULT nextval('id_antrian_seq'::regclass),
"no_antrian" int2,
"create_date" date
)
;
ALTER TABLE "antrian" OWNER TO "postgres";
CREATE TABLE "antrian_pasien" (
"id_pasien" int2,
"no_antrian" int2,
"create_date" date,
"nama" varchar(150) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"tempat_lahir" varchar(100) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"tanggal_lahir" varchar COLLATE "pg_catalog"."default",
"alamat" varchar(150) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"no_hp" varchar(50) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"id_poli" int2,
"id_dokter" int2,
"ktp" varchar(16) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"id_register" int2,
"id_antrian" int2 NOT NULL DEFAULT nextval('id_antrian_pasien_seq'::regclass),
"status_code" int2,
"id_ruang" int2,
"waktu" time(6),
"no_rekam_medis" varchar(20) COLLATE "pg_catalog"."default",
"sisa_antrian" varchar(50) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "antrian_pasien" OWNER TO "postgres";
CREATE TABLE "condition" (
"id_condition" int2 NOT NULL,
"condition" varchar(255) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "condition" OWNER TO "postgres";
CREATE TABLE "counter_status" (
"id_status" int2 NOT NULL,
"status_code" int2,
"status_name" varchar(30) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "counter_status" OWNER TO "postgres";
CREATE TABLE "divisi_witel" (
"divisi_witel_id" varchar(3) COLLATE "pg_catalog"."default" NOT NULL,
"divisi_witel_name" varchar(32) COLLATE "pg_catalog"."default",
"id_dmaco" int4,
"witel_imon" varchar(100) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "divisi_witel" OWNER TO "postgres";
CREATE TABLE "dokter" (
"id_dokter" int2 NOT NULL DEFAULT nextval('id_dokter_seq'::regclass),
"nama_dokter" varchar(30) COLLATE "pg_catalog"."default",
"kode_dokter" varchar(20) COLLATE "pg_catalog"."default",
"image_dokter" varchar(50) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "dokter" OWNER TO "postgres";
CREATE TABLE "dokter_to_poli" (
"id_dokter" int2 NOT NULL DEFAULT nextval('"dokter\_id_dokter_seq"'::regclass),
"nama_dokter" varchar(30) COLLATE "pg_catalog"."default",
"id_poli" int2,
"id_condition" int2,
"kode_dokter" varchar(30) COLLATE "pg_catalog"."default",
"create_date" date,
"image_dokter" varchar(30) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "dokter_to_poli" OWNER TO "postgres";
CREATE TABLE "master_parameter" (
"idm_parameter" int4 NOT NULL,
"param_type" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
"param_val1" varchar(500) COLLATE "pg_catalog"."default",
"param_val2" varchar(500) COLLATE "pg_catalog"."default",
"param_val3" varchar(500) COLLATE "pg_catalog"."default",
"param_desc" varchar(1000) COLLATE "pg_catalog"."default",
"param_parent" int4
)
;
ALTER TABLE "master_parameter" OWNER TO "postgres";
COMMENT ON TABLE "master_parameter" IS 'master parameter';
CREATE TABLE "pasien" (
"id_pasien" int2 NOT NULL DEFAULT nextval('pasien_id_pasien_seq'::regclass),
"nama" varchar(255) COLLATE "pg_catalog"."default",
"tempat_lahir" varchar(255) COLLATE "pg_catalog"."default",
"tanggal_lahir" varchar(255) COLLATE "pg_catalog"."default",
"alamat" varchar(255) COLLATE "pg_catalog"."default",
"no_hp" varchar(255) COLLATE "pg_catalog"."default",
"ktp" varchar(255) COLLATE "pg_catalog"."default",
"create_date" date,
"no_rekam_medis" varchar(20) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "pasien" OWNER TO "postgres";
CREATE TABLE "poli" (
"id_poli" int2 NOT NULL DEFAULT nextval('poli_id_poli_seq'::regclass),
"nama_poli" varchar(30) COLLATE "pg_catalog"."default",
"kode_poli" varchar(5) COLLATE "pg_catalog"."default",
"deskripsi_poli" varchar(1000) COLLATE "pg_catalog"."default",
"image_poli" varchar(500) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "poli" OWNER TO "postgres";
CREATE TABLE "register_antrian" (
"id_registerantrian" int2 NOT NULL DEFAULT nextval('id_register_antrian_seq'::regclass),
"antrian_all" int2,
"create_date" date,
"jam_mulai" varchar(6) COLLATE "pg_catalog"."default",
"waktu_antrian" varchar(6) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "register_antrian" OWNER TO "postgres";
CREATE TABLE "register_dokter" (
"id_register" int2 NOT NULL DEFAULT nextval('id_register_dokter_seq'::regclass),
"id_poli" int2,
"id_dokter" int2,
"id_ruang" int2,
"antrian_all" int2,
"create_date" date,
"id_condition" int2,
"jam_mulai" varchar(6) COLLATE "pg_catalog"."default",
"waktu_antrian" varchar(6) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "register_dokter" OWNER TO "postgres";
CREATE TABLE "ruang" (
"id_ruang" int2 NOT NULL DEFAULT nextval('id_ruang_seq'::regclass),
"nama_ruang" varchar(50) COLLATE "pg_catalog"."default",
"id_poli" int2,
"id_condition" int2,
"lantai" varchar(50) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "ruang" OWNER TO "postgres";
CREATE TABLE "user_data_access" (
"access_id" int4 NOT NULL,
"access_name" varchar(50) COLLATE "pg_catalog"."default",
"access_type" varchar(255) COLLATE "pg_catalog"."default",
"access_code" numeric(10),
"access_desc" varchar(100) COLLATE "pg_catalog"."default",
"access_action" varchar(100) COLLATE "pg_catalog"."default",
"access_controller" varchar(100) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "user_data_access" OWNER TO "postgres";
COMMENT ON COLUMN "user_data_access"."access_action" IS 'NAMA FUNGSI PHP';
COMMENT ON COLUMN "user_data_access"."access_controller" IS 'NAMA CONTROLLERNYA';
CREATE TABLE "user_data_header" (
"iduser" int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE 1
MAXVALUE 2147483647
START 1
),
"username" varchar(100) COLLATE "pg_catalog"."default",
"password" varchar(100) COLLATE "pg_catalog"."default",
"name" varchar(100) COLLATE "pg_catalog"."default",
"role" int4,
"status" int4,
"deviceid" varchar(255) COLLATE "pg_catalog"."default",
"accessToken" varchar(255) COLLATE "pg_catalog"."default",
"create_dtm" timestamp(6),
"retries" varchar(10) COLLATE "pg_catalog"."default",
"update_date" timestamp(6),
"email" varchar(50) COLLATE "pg_catalog"."default",
"authKey" varchar(255) COLLATE "pg_catalog"."default",
"nik" varchar(100) COLLATE "pg_catalog"."default",
"lokasi_p" varchar(100) COLLATE "pg_catalog"."default",
"domain_p" varchar(100) COLLATE "pg_catalog"."default",
"regional_id" int2,
"witel_id" varchar(50) COLLATE "pg_catalog"."default",
"last_update" timestamp(6)
)
;
ALTER TABLE "user_data_header" OWNER TO "postgres";
COMMENT ON COLUMN "user_data_header"."role" IS 'RELATION WITH TB: USER_DATA_ROLE';
COMMENT ON COLUMN "user_data_header"."status" IS 'SET STATUS USER: ';
CREATE TABLE "user_data_map" (
"map_id" int4 NOT NULL,
"access_code" int4,
"role_code" int4,
"access_status" varchar(255) COLLATE "pg_catalog"."default",
"last_update" timestamp(6)
)
;
ALTER TABLE "user_data_map" OWNER TO "postgres";
CREATE TABLE "user_data_role" (
"access_role_id" int4 NOT NULL,
"name" varchar(50) COLLATE "pg_catalog"."default",
"access_role_code" int4,
"description" varchar(50) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "user_data_role" OWNER TO "postgres";
CREATE TABLE "user_data_session" (
"session_id" varchar(500) COLLATE "pg_catalog"."default" NOT NULL,
"name" varchar(200) COLLATE "pg_catalog"."default",
"modified" numeric(20),
"lifetime" numeric(20),
"data" varchar(4000) COLLATE "pg_catalog"."default",
"owner" varchar(200) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "user_data_session" OWNER TO "postgres";
CREATE OR REPLACE FUNCTION "get_antrian_self"()
RETURNS "pg_catalog"."int4" AS $BODY$
declare
antrian_count integer;
begin
SELECT antrian.no_antrian
into antrian_count FROM antrian
INNER JOIN pasien
ON antrian.id_pasien = pasien.id_pasien
WHERE pasien.create_date= CURRENT_DATE AND pasien.kode_antrian ='1' ORDER BY no_antrian DESC;
return antrian_count;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION "get_antrian_self"() OWNER TO "postgres";
CREATE OR REPLACE FUNCTION "get_antriann"("kode_antrian" int4)
RETURNS "pg_catalog"."int4" AS $BODY$
declare
antrian_count integer;
begin
INSERT INTO antrian(no_antrian,kode_antrian) VALUES ($1, $2);
select count(*)
into antrian_count
from antrian;
return antrian_count;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION "get_antriann"("kode_antrian" int4) OWNER TO "postgres";
CREATE OR REPLACE FUNCTION "get_film_count"("len_from" int4, "len_to" int4)
RETURNS "pg_catalog"."int4" AS $BODY$
declare
film_count integer;
begin
select count(*)
into film_count
from film
where length between len_from and len_to;
return film_count;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION "get_film_count"("len_from" int4, "len_to" int4) OWNER TO "postgres";
CREATE OR REPLACE FUNCTION "get_no_mobile"()
RETURNS "pg_catalog"."int4" AS $BODY$
declare
antrian_count integer;
begin
SELECT count(antrian.no_antrian)
into antrian_count FROM antrian
INNER JOIN pasien
ON antrian.id_pasien = pasien.id_pasien
WHERE pasien.create_date= CURRENT_DATE AND pasien.kode_antrian ='2' ;
return antrian_count;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION "get_no_mobile"() OWNER TO "postgres";
CREATE OR REPLACE FUNCTION "get_no_web"()
RETURNS "pg_catalog"."int4" AS $BODY$
declare
antrian_count integer;
begin
SELECT count(antrian.no_antrian)
into antrian_count FROM antrian
INNER JOIN pasien
ON antrian.id_pasien = pasien.id_pasien
WHERE pasien.create_date= CURRENT_DATE AND pasien.kode_antrian ='1' ;
return antrian_count;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION "get_no_web"() OWNER TO "postgres";
CREATE OR REPLACE FUNCTION "insert_data"("input_id_pasien" int4, "input_id_poli" int4)
RETURNS "pg_catalog"."int4" AS $BODY$
declare
antrian_count integer;
input_id_pasien INTEGER ;
input_id_poli INTEGER;
begin
SELECT no_antrian into antrian_count FROM antrian WHERE "id_poli" = input_id_poli AND "id_pasien" IS NULL LIMIT 1 ;
UPDATE antrian SET id_pasien=input_id_pasien , kode_antrian='1' WHERE no_antrian=antrian_count AND id_poli=input_id_poli ;
return antrian_count;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION "insert_data"("input_id_pasien" int4, "input_id_poli" int4) OWNER TO "postgres";
BEGIN;
LOCK TABLE "public"."antrian" IN SHARE MODE;
DELETE FROM "public"."antrian";
INSERT INTO "public"."antrian" ("id_antrian","no_antrian","create_date") VALUES (236, 1, '2020-11-04'),(237, 2, '2020-11-04'),(238, 3, '2020-11-04'),(239, 4, '2020-11-04'),(240, 5, '2020-11-04'),(241, 6, '2020-11-04'),(242, 7, '2020-11-04'),(243, 8, '2020-11-04'),(244, 9, '2020-11-04'),(245, 10, '2020-11-04'),(246, 11, '2020-11-04'),(247, 12, '2020-11-04'),(258, 1, '2020-11-04'),(259, 2, '2020-11-04'),(225, 1, '2020-11-04'),(226, 2, '2020-11-04'),(227, 3, '2020-11-04'),(228, 4, '2020-11-04'),(229, 5, '2020-11-04'),(230, 6, '2020-11-04'),(231, 7, '2020-11-04'),(232, 8, '2020-11-04'),(233, 9, '2020-11-04'),(234, 10, '2020-11-04'),(235, 11, '2020-11-04'),(260, 3, '2020-11-04'),(261, 4, '2020-11-04'),(262, 5, '2020-11-04'),(263, 6, '2020-11-04'),(264, 7, '2020-11-04'),(265, 8, '2020-11-04'),(266, 9, '2020-11-04'),(267, 10, '2020-11-04'),(268, 11, '2020-11-04'),(269, 12, '2020-11-04'),(203, 1, '2020-11-04'),(204, 2, '2020-11-04'),(205, 3, '2020-11-04'),(206, 4, '2020-11-04'),(207, 5, '2020-11-04'),(208, 6, '2020-11-04'),(209, 7, '2020-11-04'),(210, 8, '2020-11-04'),(211, 9, '2020-11-04'),(212, 10, '2020-11-04'),(213, 11, '2020-11-04'),(214, 12, '2020-11-04'),(215, 1, '2020-11-03'),(216, 2, '2020-11-03'),(217, 3, '2020-11-03'),(218, 4, '2020-11-03'),(219, 5, '2020-11-03'),(220, 6, '2020-11-03'),(221, 7, '2020-11-03'),(222, 8, '2020-11-03'),(223, 9, '2020-11-03'),(224, 10, '2020-11-03'),(248, 1, '2020-11-03'),(249, 2, '2020-11-03'),(250, 3, '2020-11-03'),(251, 4, '2020-11-03'),(252, 5, '2020-11-03'),(253, 6, '2020-11-03'),(254, 7, '2020-11-03'),(255, 8, '2020-11-03'),(256, 9, '2020-11-03'),(257, 10, '2020-11-03'),(270, 1, '2020-11-05'),(271, 2, '2020-11-05'),(272, 3, '2020-11-05'),(273, 4, '2020-11-05'),(274, 5, '2020-11-05'),(275, 6, '2020-11-05'),(276, 7, '2020-11-05'),(277, 8, '2020-11-05'),(278, 9, '2020-11-05'),(279, 10, '2020-11-05'),(280, 11, '2020-11-05'),(281, 12, '2020-11-05');
COMMIT;
BEGIN;
LOCK TABLE "public"."antrian_pasien" IN SHARE MODE;
DELETE FROM "public"."antrian_pasien";
INSERT INTO "public"."antrian_pasien" ("id_pasien","no_antrian","create_date","nama","tempat_lahir","tanggal_lahir","alamat","no_hp","id_poli","id_dokter","ktp","id_register","id_antrian","status_code","id_ruang","waktu","no_rekam_medis","sisa_antrian") VALUES (34, 1, '2020-11-03', 'Ret', 'Bandung', '0012-12-12', 'Bandung', '12121212', 13, 8, '1234567891654321', 24, 248, 10, 2, NULL, 'CU644262', '0'),(14, 7, '2020-11-05', 'KAKA', '', '', '', '', 12, 2, '12', 26, 276, 10, 3, NULL, '00000119', '3'),(26, 7, '2020-11-03', '', '', '', '', '', 13, 8, '', 24, 254, 10, 2, NULL, '00000131', '0'),(26, 3, '2020-11-03', '', '', '', '', '', 13, 8, '', 24, 250, 10, 2, NULL, '00000131', '0'),(3, 10, '2020-11-03', 'AZY', 'Bandung', '0012-12-12', 'Bandung', '123456789098', 12, 2, '1234567890909090', 21, 224, 10, 3, NULL, '00000076', '0'),(16, 9, '2020-11-03', 'Indra', 'Bandung', '', '', '', 12, 2, '1235466', 21, 223, 10, 3, NULL, '00000121', '0'),(13, 5, '2020-11-04', 'de', '', '', '', '', 13, 8, '21321', 25, 262, 10, 2, NULL, '00000086', '0'),(11, 10, '2020-11-04', 'Hehe', '', '', '', '', 13, 8, '1234567891', 25, 267, 10, 2, NULL, '00000084', '1'),(NULL, 5, '2020-11-05', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 26, 274, NULL, 3, NULL, NULL, NULL),(NULL, 8, '2020-11-03', 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', 12, 2, '1234543212345654', 21, 222, 60, 3, NULL, 'AT816784', NULL),(32, 8, '2020-11-04', 'akaka', 'kaka', '0010-12-01', '11', '123456789', 12, 2, '0000000000000002', 22, 232, 60, 3, NULL, 'PN342495', '1'),(NULL, 11, '2020-11-05', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 26, 280, NULL, 3, NULL, NULL, NULL),(29, 11, '2020-11-04', 'kkakaka', 'bandung', '0012-12-12', 'sasas', '12345678909', 12, 2, '1234567891123456', 22, 235, 60, 3, NULL, 'FP240253', '2'),(NULL, 12, '2020-11-05', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 26, 281, NULL, 3, NULL, NULL, NULL),(36, 10, '2020-11-05', 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', 12, 2, '1234543212345654', 26, 279, 10, 3, NULL, 'KB724044', '2'),(NULL, 2, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 24, 249, NULL, 2, NULL, NULL, NULL),(NULL, 7, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 22, 231, NULL, 3, NULL, 'GF406872', NULL),(NULL, 4, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 24, 251, NULL, 2, NULL, NULL, NULL),(NULL, 5, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 24, 252, NULL, 2, NULL, NULL, NULL),(NULL, 6, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 24, 253, NULL, 2, NULL, NULL, NULL),(NULL, 5, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 21, 219, NULL, 3, NULL, NULL, NULL),(NULL, 7, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 21, 221, NULL, 3, NULL, NULL, NULL),(NULL, 8, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 24, 255, NULL, 2, NULL, NULL, NULL),(NULL, 9, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 24, 256, NULL, 2, NULL, NULL, NULL),(NULL, 10, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 24, 257, NULL, 2, NULL, NULL, NULL),(NULL, 1, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 258, NULL, 2, NULL, NULL, NULL),(NULL, 2, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 22, 226, NULL, 3, NULL, NULL, NULL),(NULL, 2, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 259, NULL, 2, NULL, NULL, NULL),(NULL, 3, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 260, NULL, 2, NULL, NULL, NULL),(NULL, 4, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 261, NULL, 2, NULL, NULL, NULL),(NULL, 6, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 22, 230, NULL, 3, NULL, NULL, NULL),(NULL, 6, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 263, NULL, 2, NULL, NULL, NULL),(NULL, 3, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 21, 217, 60, 3, NULL, NULL, NULL),(NULL, 7, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 264, NULL, 2, NULL, NULL, NULL),(NULL, 8, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 265, NULL, 2, NULL, NULL, NULL),(NULL, 1, '2020-11-03', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 21, 215, NULL, 3, NULL, NULL, NULL),(NULL, 1, '2020-11-03', 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', 12, 2, '1234543212345654', 22, 225, NULL, 3, NULL, 'AT816784', NULL),(NULL, 9, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 266, NULL, 2, NULL, NULL, NULL),(NULL, 11, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 268, NULL, 2, NULL, NULL, NULL),(NULL, 12, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 13, 8, NULL, 25, 269, NULL, 2, NULL, NULL, NULL),(NULL, 9, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 22, 233, NULL, 3, NULL, NULL, NULL),(NULL, 10, '2020-11-04', NULL, NULL, NULL, NULL, NULL, 12, 2, NULL, 22, 234, NULL, 3, NULL, NULL, NULL),(NULL, 3, '2020-11-03', 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', 12, 2, '1234543212345654', 22, 227, NULL, 3, NULL, 'AT816784', NULL),(NULL, 5, '2020-11-03', 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', 12, 2, '1234543212345654', 22, 229, NULL, 3, NULL, 'AT816784', NULL),(NULL, 2, '2020-11-03', 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', 12, 2, '1234543212345654', 21, 216, NULL, 3, NULL, 'AT816784', NULL),(NULL, 6, '2020-11-03', 'akaka', 'kaka', '0010-12-01', '11', '123456789', 12, 2, '0000000000000002', 21, 220, NULL, 3, NULL, 'PN342495', NULL),(NULL, 4, '2020-11-03', 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', 12, 2, '1234543212345654', 21, 218, 50, 3, NULL, 'AT816784', NULL),(30, 4, '2020-11-04', 'akaka', 'kaka', '0010-12-01', '11', '123456789', 12, 2, '0000000000000000', 22, 228, 50, 3, NULL, 'QA905603', '0'),(33, 4, '2020-11-05', 'asca', 'sdasd', '0123-03-12', 'asd', '123123', 12, 2, '1234567890987655', 26, 273, 50, 3, NULL, 'GF406872', '0'),(27, 9, '2020-11-05', '', '', '', '', '', 12, 2, '', 26, 278, 10, 3, NULL, '00000132', '2'),(14, 3, '2020-11-05', 'KAKA', '', '', '', '', 12, 2, '12', 26, 272, 10, 3, NULL, '00000119', '1'),(14, 6, '2020-11-05', 'KAKA', '', '', '', '', 12, 2, '12', 26, 275, 10, 3, NULL, '00000119', '2'),(14, 2, '2020-11-05', 'KAKA', '', '', '', '', 12, 2, '12', 26, 271, 10, 3, NULL, '00000119', '1'),(14, 8, '2020-11-05', 'KAKA', '', '', '', '', 12, 2, '12', 26, 277, 10, 3, NULL, '00000119', '5'),(NULL, 1, '2020-11-05', '', '', '', '', '', 12, 2, '', 26, 270, 10, 3, NULL, '00000132', '0');
COMMIT;
BEGIN;
LOCK TABLE "public"."condition" IN SHARE MODE;
DELETE FROM "public"."condition";
INSERT INTO "public"."condition" ("id_condition","condition") VALUES (1, 'Aktif'),(2, 'Tidak Aktif');
COMMIT;
BEGIN;
LOCK TABLE "public"."counter_status" IN SHARE MODE;
DELETE FROM "public"."counter_status";
INSERT INTO "public"."counter_status" ("id_status","status_code","status_name") VALUES (1, 10, 'Queue'),(2, 20, 'Next'),(3, 30, 'Call'),(4, 40, 'Served'),(5, 50, 'Done'),(6, 60, 'Missed');
COMMIT;
BEGIN;
LOCK TABLE "public"."divisi_witel" IN SHARE MODE;
DELETE FROM "public"."divisi_witel";
COMMIT;
BEGIN;
LOCK TABLE "public"."dokter" IN SHARE MODE;
DELETE FROM "public"."dokter";
INSERT INTO "public"."dokter" ("id_dokter","nama_dokter","kode_dokter","image_dokter") VALUES (4, 'ReyNaldi', 'RN', 'azy.png'),(9, 'roy', 'RY', 'budi.png'),(8, 'Dokter Kulit & Kelamin', 'DKK', 'azy.jpg'),(2, 'Dokter Gigi', 'DGG', 'rahmat.png'),(3, 'Dokter Mata', 'DM', 'asron.png'),(7, 'Dokter Umum', 'DU', 'azy.png');
COMMIT;
BEGIN;
LOCK TABLE "public"."dokter_to_poli" IN SHARE MODE;
DELETE FROM "public"."dokter_to_poli";
INSERT INTO "public"."dokter_to_poli" ("id_dokter","nama_dokter","id_poli","id_condition","kode_dokter","create_date","image_dokter") VALUES (3, 'Dokter Mata', 11, 1, 'DM', '2020-10-21', 'asron.png'),(7, 'Dokter Umum', 9, 2, 'DU', '2020-10-27', 'azy.png'),(8, 'Dokter Kulit & Kelamin', 13, 2, 'DKK', '2020-10-27', 'budi.png'),(2, 'Dokter Gigi', 12, 2, 'DGG', '2020-10-21', 'rahmat.png');
COMMIT;
BEGIN;
LOCK TABLE "public"."master_parameter" IN SHARE MODE;
DELETE FROM "public"."master_parameter";
INSERT INTO "public"."master_parameter" ("idm_parameter","param_type","param_val1","param_val2","param_val3","param_desc","param_parent") VALUES (1, 'USER_STATUS', 'ACTIVE', '10', NULL, 'USER ACTIVE GANS', NULL),(2, 'USER_STATUS', 'NOT ACTIVE', '20', NULL, 'USER NOT ACTIVE GANS', NULL),(3, 'USER_STATUS', 'BLOCKED', '30', NULL, 'USER NA DIBLOCK', NULL),(4, 'INPUT_TYPE', 'INPUT', '1', NULL, NULL, NULL),(5, 'INPUT_TYPE', 'TEXTAREA', '2', NULL, NULL, NULL),(6, 'INPUT_OPTION', 'SELECT_OPTION', '3', NULL, NULL, NULL),(7, 'INPUT_RADIO', 'RADION_BUTTON', '4', NULL, NULL, NULL),(8, 'TYPE_DATA', 'I_VARCHAR', '1', NULL, 'JENIS INPUTAN VARCHAR', NULL),(9, 'TYPE_DATA', 'I_NUMBER', '2', NULL, 'JENIS INPUTAN NUMBER', NULL);
COMMIT;
BEGIN;
LOCK TABLE "public"."pasien" IN SHARE MODE;
DELETE FROM "public"."pasien";
INSERT INTO "public"."pasien" ("id_pasien","nama","tempat_lahir","tanggal_lahir","alamat","no_hp","ktp","create_date","no_rekam_medis") VALUES (6, 'huha', '', '', '', '', '1234567891', '2020-09-25', '00000079'),(7, 'ass', 'ass', '', '', '', '1234567891', '2020-09-25', '00000080'),(8, 'ass', 'ass', '', '', '', '1234567891', '2020-09-25', '00000081'),(9, 'ass', 'ass', '', '', '', '1234567891', '2020-09-25', '00000082'),(10, 'azy', '', '', '', '', '1234567891', '2020-09-25', '00000083'),(11, 'Hehe', '', '', '', '', '1234567891', '2020-09-25', '00000084'),(12, 'qsw', '', '', '', '', '1234567891', '2020-09-25', '00000085'),(13, 'de', '', '', '', '', '21321', '2020-09-25', '00000086'),(14, 'KAKA', '', '', '', '', '12', '2020-09-27', '00000119'),(16, 'Indra', 'Bandung', '', '', '', '1235466', '2020-09-28', '00000121'),(18, '123', '', '', '', '', '1234567891', '2020-09-28', '00000123'),(20, 'HAHAHA', '', '', '', '', '12345', '2020-09-28', '00000125'),(22, 'Rey', '123123', '123', '12313', '', '3211111111111111', '2020-09-29', '00000127'),(23, 'Azy', '', '', '', '', '1234567890987654', '2020-09-29', '00000128'),(24, 'ikbal', '', '', '', '', '2312312', '2020-10-12', '00000129'),(25, 'azy', '', '', '', '', '11', '2020-10-14', '00000130'),(26, '', '', '', '', '', '', '2020-10-21', '00000131'),(27, '', '', '', '', '', '', '2020-10-21', '00000132'),(28, 'AHEF', 'HIJA', '1998-02-12', 'Bandung', '089898989', '1234567890123456', '2020-10-21', 'QW4424'),(29, 'kkakaka', 'bandung', '0012-12-12', 'sasas', '12345678909', '1234567891123456', '2020-10-21', 'FP240253'),(30, 'akaka', 'kaka', '0010-12-01', '11', '123456789', '0000000000000000', '2020-10-21', 'QA905603'),(31, 'akaka', 'kaka', '0010-12-01', '11', '123456789', '0000000000000001', '2020-10-21', 'TZ711240'),(32, 'akaka', 'kaka', '0010-12-01', '11', '123456789', '0000000000000002', '2020-10-21', 'PN342495'),(33, 'asca', 'sdasd', '0123-03-12', 'asd', '123123', '1234567890987655', '2020-10-23', 'GF406872'),(3, 'AZY', 'Bandung', '0012-12-12', 'Bandung', '123456789098', '1234567890909090', '2020-09-25', '00000076'),(4, 'REY', 'Bandung', '0012-12-12', 'BANDUNG', '123456789', '2121234567890987', '2020-09-25', '00000077'),(34, 'Ret', 'Bandung', '0012-12-12', 'Bandung', '12121212', '1234567891654321', '2020-10-27', 'CU644262'),(35, 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', '1234543212345654', '2020-11-03', 'AT816784'),(36, 'UJI GBLK', 'Bandung', '0012-12-12', 'Bandung', '12345678', '1234543212345654', '2020-11-03', 'KB724044');
COMMIT;
BEGIN;
LOCK TABLE "public"."poli" IN SHARE MODE;
DELETE FROM "public"."poli";
INSERT INTO "public"."poli" ("id_poli","nama_poli","kode_poli","deskripsi_poli","image_poli") VALUES (9, 'Umum', 'UM', 'Poli umum merupakan salah satu dari jenis layanan yang memberikan pelayanan kedokteran berupa pemeriksaan kesehatan, pengobatan dan penyuluhan kepada pasien atau masyarakat agar tidak terjadi penularan dan komplikasi penyakit, serta meningkatkan pengetahuan dan kesadaran masyarakat dalam bidang kesehatan.', 'umum.png'),(11, 'Mata', 'MT', 'Poli mata merupakan suatu instalasi yang memberikan pelayanan mata secara menyeluruh kepada masyarakat secara nyaman dan terpercaya, yang meliputi aspek preventif, kuratif, promotif dan rehabilitatif bedah maupun non bedah dengan harapan dapat menurunkan angka kebutaan di Indonesia. kebutuhan masyarakat.', 'mata.png'),(13, 'Kulit & Kelamin', 'KK', 'Poliklinik Kulit & Kelamin adalah klinik yang melayani konsultasi kesehatan kulit dan kelamin, perawatan kecantikan untuk pasien dari berbagai usia yang memiliki permasalahan kulit maupun penyakit kelamin, dengan didukung dokter ahli spesialis kulit dan kelamin yang kompeten. Klinik ini ditunjang dengan peralatan dan fasilitas ruang konsultasi, tindakan, perawatan kulit dan kecantikan yang lengkap.', 'kulit.png'),(12, 'GIGI', 'GG', 'Poli Gigi, berupa pelayanan gigi yaitu pemeriksaan, pengobatan, dan konsultasi medis, premedikasi, kegawatdaruratan oro-dental, pencabutan gigi sulung (topical, infiltrasi), pencabutan gigi permanen tanpa penyulit, obat pasca ekstraksi, tumpatan komposit, glass ionomer cement (GIC), scalling (pembersihan karang gigi), serta pelayanan gigi lain yang dapat dilakukan di fasilitas kesehatan tingkat pertama sesuai Panduan Praktik Klinik (PPK) Dokter Gigi.', 'gigi.png');
COMMIT;
BEGIN;
LOCK TABLE "public"."register_antrian" IN SHARE MODE;
DELETE FROM "public"."register_antrian";
INSERT INTO "public"."register_antrian" ("id_registerantrian","antrian_all","create_date","jam_mulai","waktu_antrian") VALUES (22, 11, '2020-11-04', '6:11', '0:11'),(21, 10, '2020-11-03', '6:12', '0:12'),(23, 12, '2020-11-04', '6:21', '0:12'),(24, 10, '2020-11-03', '6:00', '0:06'),(25, 12, '2020-11-04', '6:12', '0:01'),(26, 12, '2020-11-05', '6:21', '0:12');
COMMIT;
BEGIN;
LOCK TABLE "public"."register_dokter" IN SHARE MODE;
DELETE FROM "public"."register_dokter";
INSERT INTO "public"."register_dokter" ("id_register","id_poli","id_dokter","id_ruang","antrian_all","create_date","id_condition","jam_mulai","waktu_antrian") VALUES (22, 12, 2, 3, 11, '2020-11-03', 1, '6:11', '0:11'),(21, 12, 2, 3, 11, '2020-11-04', 1, '6:12', '0:12'),(24, 13, 8, 2, 10, '2020-11-03', 1, '6:00', '0:06'),(25, 13, 8, 2, 12, '2020-11-04', 1, '6:12', '0:01'),(26, 12, 2, 3, 12, '2020-11-05', 1, '6:21', '0:12');
COMMIT;
BEGIN;
LOCK TABLE "public"."ruang" IN SHARE MODE;
DELETE FROM "public"."ruang";
INSERT INTO "public"."ruang" ("id_ruang","nama_ruang","id_poli","id_condition","lantai") VALUES (4, '5', 9, 2, '2'),(2, '1', 13, 2, '1'),(3, '1', 12, 2, '2');
COMMIT;
BEGIN;
LOCK TABLE "public"."user_data_access" IN SHARE MODE;
DELETE FROM "public"."user_data_access";
INSERT INTO "public"."user_data_access" ("access_id","access_name","access_type","access_code","access_desc","access_action","access_controller") VALUES (1, 'DELETE TEST DATA', 'ACTION', 10, 'TEST FUNCTION', NULL, NULL),(2, 'MENU TEST DATA', 'MENU', 20, 'TEST MENU', NULL, NULL),(3, 'USER MANAGEMENT', 'MENU', 30, 'MENU USER MANAMEGENT', 'usermanagement', 'UserController');
COMMIT;
BEGIN;
LOCK TABLE "public"."user_data_header" IN SHARE MODE;
DELETE FROM "public"."user_data_header";
INSERT INTO "public"."user_data_header" ("iduser","username","password","name","role","status","deviceid","accessToken","create_dtm","retries","update_date","email","authKey","nik","lokasi_p","domain_p","regional_id","witel_id","last_update") VALUES (5, '930159', NULL, 'Ratna Wulan Sari', 30, 10, NULL, '$2y$10$e5IlkVkq/7zxhuVgORVH6uY850T5NiY.MZzoVk8ASnEfRr.6ooira', '2020-01-14 01:16:32', NULL, NULL, 'ratna.sari@telkom.co.id', 'a0e3e79e631b49115bd0cb927120f9eb', '930159', 'JAKARTA', 'Telkom', NULL, NULL, NULL),(9, 'witels', '758a27752fa96f0e612e8c75b0d619a9', 'witels', 20, 10, NULL, NULL, '2020-06-21 22:50:03', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, '351', NULL),(6, 'test1', '5a105e8b9d40e1329780d62ea2265d8a', 'test1', 10, 30, NULL, NULL, '2020-06-21 21:57:41', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),(7, 'test1', '5a105e8b9d40e1329780d62ea2265d8a', 'test1', 10, 20, NULL, NULL, '2020-06-21 21:57:44', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),(8, 'test2', 'ad0234829205b9033196ba818f7a872b', 'test2', 20, 10, NULL, NULL, '2020-06-21 21:59:39', 'NULL', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),(1, 'danirusdanx', '5036592afd6e403097c37eef12ad8285', 'danirusdan', 10, 10, NULL, NULL, '2017-07-09 22:30:23', 'NULL', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),(4, 'adminx', '$2y$10$7NnmhGtMZJTbS7gRVl/c0OIrCK29/rurfhBdZAKlgN8y/WcV8nbRa', 'Saya Karyawan', 30, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),(3, 'danirusdan', '$2y$10$7NnmhGtMZJTbS7gRVl/c0OIrCK29/rurfhBdZAKlgN8y/WcV8nbRa', 'danirusdan', 10, 10, NULL, '$2y$10$zDNOrVtdYYGE3yBINaDDb.2506QHLSvGHn/hMxtqAkl21dWKEWsAG', NULL, '2', NULL, NULL, 'c46714daa0d91976579686bcad938849', NULL, NULL, NULL, NULL, NULL, NULL),(2, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Atang', 10, 10, NULL, NULL, '2017-08-10 10:29:40', 'NULL', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
COMMIT;
BEGIN;
LOCK TABLE "public"."user_data_map" IN SHARE MODE;
DELETE FROM "public"."user_data_map";
INSERT INTO "public"."user_data_map" ("map_id","access_code","role_code","access_status","last_update") VALUES (4, 10, 20, 'TRUE', '2020-06-21 21:12:51.219377'),(5, 20, 20, 'TRUE', '2020-06-21 21:13:06.007902'),(1, 10, 10, 'TRUE', '2020-06-21 21:14:13.680576'),(3, 30, 10, 'TRUE', '2020-06-21 21:14:22.116003'),(2, 20, 10, 'FALSE', '2020-06-21 21:47:09.580874'),(6, 30, 20, 'FALSE', '2020-06-23 17:10:04.467554');
COMMIT;
BEGIN;
LOCK TABLE "public"."user_data_role" IN SHARE MODE;
DELETE FROM "public"."user_data_role";
INSERT INTO "public"."user_data_role" ("access_role_id","name","access_role_code","description") VALUES (1, 'MASTER', 10, 'BISA SAGALA EDANS'),(2, 'ADMIN', 20, 'ADMIN'),(3, 'REGIONAL', 30, 'EDAN1'),(4, 'WITEL', 40, 'UWU');
COMMIT;
BEGIN;
LOCK TABLE "public"."user_data_session" IN SHARE MODE;
DELETE FROM "public"."user_data_session";
INSERT INTO "public"."user_data_session" ("session_id","name","modified","lifetime","data","owner") VALUES ('5v0oot9tprnpatk4ike1uv2nho', 'KHANSIA', 1603425445, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603425445.550543;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"5v0oot9tprnpatk4ike1uv2nho";}s:3:"_LT";i:86400;s:3:"_LA";i:1603425445;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"ecc1e60894d8f514b6a2c5531683484b";s:7:"baseurl";s:14:"//frontend.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('b5u3q3b0jo0b4bqc1vfmlvom5g', 'KHANSIA', 1603251609, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603251609.267616;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"b5u3q3b0jo0b4bqc1vfmlvom5g";}s:3:"_LT";i:86400;s:3:"_LA";i:1603251609;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"5c9dbb3adb4342f985ca0c23a19ce1a7";s:7:"baseurl";s:14:"//frontend.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('blsrhft6bkanmbslp44je47e5p', 'KHANSIA', 1603101283, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603101283.652502;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"blsrhft6bkanmbslp44je47e5p";}s:3:"_LT";i:86400;s:3:"_LA";i:1603101283;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"e697671b8432d4a38c84168d4cccbc06";s:7:"baseurl";s:14:"//frontend.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('f6ie2crc5r0lmc0n6tqjdoa38f', 'KHANSIA', 1603353013, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603353013.217118;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"f6ie2crc5r0lmc0n6tqjdoa38f";}s:3:"_LT";i:86400;s:3:"_LA";i:1603353013;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"682ace445148f99363041f0e0de3c642";s:7:"baseurl";s:14:"//frontend.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('fl4scadfoa2dlcr4hjn1deiq8k', 'KHANSIA', 1603451128, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603451128.516116;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"fl4scadfoa2dlcr4hjn1deiq8k";}s:3:"_LT";i:86400;s:3:"_LA";i:1603451128;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"6130b49e8af1dec8718db7e3ba1c1979";s:7:"baseurl";s:11:"//queue.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('b1c5jfjirtkgvm1qmt637tpvm9', 'KHANSIA', 1603697098, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603697098.278806;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"b1c5jfjirtkgvm1qmt637tpvm9";}s:3:"_LT";i:86400;s:3:"_LA";i:1603697098;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"0e8350efd08bba9301e2e1f612fd4c8f";s:7:"baseurl";s:11:"//queue.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('9rfng5e1conlvfmaaevqnh28d6', 'KHANSIA', 1603813897, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603813897.645092;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"9rfng5e1conlvfmaaevqnh28d6";}s:3:"_LT";i:86400;s:3:"_LA";i:1603813897;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"dc2af1d1a8bc10249d044db168a54259";s:7:"baseurl";s:11:"//queue.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('aju3k0b41jrc9h6er99lv23cvh', 'KHANSIA', 1603790849, 86400, '__ZF|a:4:{s:20:"_REQUEST_ACCESS_TIME";d:1603790848.49262;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"aju3k0b41jrc9h6er99lv23cvh";}s:3:"_LT";i:86400;s:3:"_LA";i:1603790848;}__KHANSIA|N;', NULL),('r2amd93mh9eua1k4lchcjm91vc', 'KHANSIA', 1603790851, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603790851.917473;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"r2amd93mh9eua1k4lchcjm91vc";}s:3:"_LT";i:86400;s:3:"_LA";i:1603790851;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"93c072b9b37df7d638e9974d3a79d423";s:7:"baseurl";s:12:"//queue1.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('jnvk15nre7gnuq634gb5vttc0q', 'KHANSIA', 1603989519, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1603989519.139075;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"jnvk15nre7gnuq634gb5vttc0q";}s:3:"_LT";i:86400;s:3:"_LA";i:1603989519;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"1cb2a80d0f7c6f112f5e410e76037087";s:7:"baseurl";s:11:"//queue.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('kanl93l9t03a9pf2uao5e3r3a1', 'KHANSIA', 1604246219, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1604246219.057064;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"kanl93l9t03a9pf2uao5e3r3a1";}s:3:"_LT";i:86400;s:3:"_LA";i:1604246219;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"a75658f9388901137ee5438edd49642a";s:7:"baseurl";s:11:"//queue.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('ujscjl8pq900rjihnpv12s2gmh', 'KHANSIA', 1604470200, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1604470200.188888;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"ujscjl8pq900rjihnpv12s2gmh";}s:3:"_LT";i:86400;s:3:"_LA";i:1604470200;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"972ae1da6c75fed4558f131337a076fa";s:7:"baseurl";s:11:"//queue.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2'),('i46s59b711anbcr7eg3dlfguer', 'KHANSIA', 1604556818, 86400, '__ZF|a:5:{s:20:"_REQUEST_ACCESS_TIME";d:1604556818.620847;s:6:"_VALID";a:1:{s:25:"Zend\Session\Validator\Id";s:26:"i46s59b711anbcr7eg3dlfguer";}s:3:"_LT";i:86400;s:3:"_LA";i:1604556818;s:6:"_OWNER";s:1:"2";}__KHANSIA|a:14:{s:14:"token_keamanan";s:32:"73522e776b806286ac53c2d5d3793194";s:7:"baseurl";s:11:"//queue.azy";s:7:"user_id";s:1:"2";s:9:"usernamed";s:5:"admin";s:6:"passwd";s:32:"21232f297a57a5a743894a0e4a801fc3";s:4:"name";s:5:"Atang";s:4:"role";s:2:"10";s:6:"status";s:2:"10";s:8:"deviceid";N;s:5:"token";N;s:7:"retries";s:4:"NULL";s:10:"create_dtm";s:19:"2017-08-10 10:29:40";s:6:"access";a:0:{}s:9:"role_code";s:1:"E";}', '2');
COMMIT;
ALTER TABLE "antrian" ADD CONSTRAINT "antrian_pkey" PRIMARY KEY ("id_antrian");
ALTER TABLE "antrian_pasien" ADD CONSTRAINT "antrian_pasien_pkey" PRIMARY KEY ("id_antrian");
ALTER TABLE "condition" ADD CONSTRAINT "condition_pkey" PRIMARY KEY ("id_condition");
ALTER TABLE "counter_status" ADD CONSTRAINT "counter_status_pkey" PRIMARY KEY ("id_status");
ALTER TABLE "divisi_witel" ADD CONSTRAINT "divisi_witel_pkey" PRIMARY KEY ("divisi_witel_id");
CREATE INDEX "idx_divisi_witel" ON "divisi_witel" USING btree (
"divisi_witel_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
ALTER TABLE "dokter" ADD CONSTRAINT "dokter_to_poli_copy1_pkey" PRIMARY KEY ("id_dokter");
ALTER TABLE "dokter_to_poli" ADD CONSTRAINT "dokter\_pkey" PRIMARY KEY ("id_dokter");
ALTER TABLE "master_parameter" ADD CONSTRAINT "master_parameter_pkey" PRIMARY KEY ("idm_parameter");
CREATE INDEX "index2" ON "master_parameter" USING btree (
"idm_parameter" "pg_catalog"."int4_ops" ASC NULLS LAST
);
CREATE INDEX "index3" ON "master_parameter" USING btree (
"param_type" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "index4" ON "master_parameter" USING btree (
"param_val1" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "index5" ON "master_parameter" USING btree (
"param_val2" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "index6" ON "master_parameter" USING btree (
"param_val3" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "index7" ON "master_parameter" USING btree (
"param_parent" "pg_catalog"."int4_ops" ASC NULLS LAST
);
ALTER TABLE "pasien" ADD CONSTRAINT "pasien_pkey" PRIMARY KEY ("id_pasien");
ALTER TABLE "poli" ADD CONSTRAINT "poli_pkey" PRIMARY KEY ("id_poli");
ALTER TABLE "register_antrian" ADD CONSTRAINT "register_antrian_pkey" PRIMARY KEY ("id_registerantrian");
ALTER TABLE "register_dokter" ADD CONSTRAINT "register_dokter_pkey" PRIMARY KEY ("id_register");
ALTER TABLE "ruang" ADD CONSTRAINT "ruang_pkey" PRIMARY KEY ("id_ruang");
ALTER TABLE "user_data_access" ADD CONSTRAINT "user_data_access_pkey" PRIMARY KEY ("access_id");
ALTER TABLE "user_data_header" ADD CONSTRAINT "user_data_header_pkey" PRIMARY KEY ("iduser");
CREATE INDEX "xiduser" ON "user_data_header" USING btree (
"iduser" "pg_catalog"."int4_ops" ASC NULLS LAST
);
CREATE INDEX "xrole" ON "user_data_header" USING btree (
"role" "pg_catalog"."int4_ops" ASC NULLS LAST
);
ALTER TABLE "user_data_map" ADD CONSTRAINT "user_data_map_pkey" PRIMARY KEY ("map_id");
ALTER TABLE "user_data_role" ADD CONSTRAINT "user_data_role_pkey" PRIMARY KEY ("access_role_id");
ALTER TABLE "user_data_session" ADD CONSTRAINT "user_data_session_pkey" PRIMARY KEY ("session_id");
ALTER TABLE "antrian_pasien" ADD CONSTRAINT "Poli" FOREIGN KEY ("id_poli") REFERENCES "public"."poli" ("id_poli") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "antrian_pasien" ADD CONSTRAINT "antrian and register" FOREIGN KEY ("id_register") REFERENCES "public"."register_dokter" ("id_register") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "antrian_pasien" ADD CONSTRAINT "antrian_pasien_id_ruang_fkey" FOREIGN KEY ("id_ruang") REFERENCES "public"."ruang" ("id_ruang") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "antrian_pasien" ADD CONSTRAINT "dokter" FOREIGN KEY ("id_dokter") REFERENCES "public"."dokter" ("id_dokter") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "antrian_pasien" ADD CONSTRAINT "dokter_to_poli" FOREIGN KEY ("id_dokter") REFERENCES "public"."dokter_to_poli" ("id_dokter") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "antrian_pasien" ADD CONSTRAINT "no_rekam_medis" FOREIGN KEY ("no_rekam_medis") REFERENCES "public"."pasien" ("no_rekam_medis") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "dokter_to_poli" ADD CONSTRAINT "Dokter" FOREIGN KEY ("id_dokter") REFERENCES "public"."dokter" ("id_dokter") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "dokter_to_poli" ADD CONSTRAINT "Poli" FOREIGN KEY ("id_poli") REFERENCES "public"."poli" ("id_poli") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "dokter_to_poli" ADD CONSTRAINT "condition" FOREIGN KEY ("id_condition") REFERENCES "public"."condition" ("id_condition") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "master_parameter" ADD CONSTRAINT "master_parameter_ibfk_1" FOREIGN KEY ("param_parent") REFERENCES "public"."master_parameter" ("idm_parameter") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "pasien" ADD CONSTRAINT "id_pasien" UNIQUE ("no_rekam_medis");
ALTER TABLE "ruang" ADD CONSTRAINT "condition" FOREIGN KEY ("id_condition") REFERENCES "public"."condition" ("id_condition") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "ruang" ADD CONSTRAINT "id_poli" FOREIGN KEY ("id_poli") REFERENCES "public"."poli" ("id_poli") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER SEQUENCE "dokter\_id_dokter_seq"
OWNED BY "dokter_to_poli"."id_dokter";
SELECT setval('"dokter\_id_dokter_seq"', 9, true);
ALTER SEQUENCE "dokter\_id_dokter_seq" OWNER TO "postgres";
ALTER SEQUENCE "id_antrian_pasien_seq"
OWNED BY "antrian_pasien"."id_antrian";
SELECT setval('"id_antrian_pasien_seq"', 282, true);
ALTER SEQUENCE "id_antrian_pasien_seq" OWNER TO "postgres";
ALTER SEQUENCE "id_antrian_seq"
OWNED BY "antrian"."id_antrian";
SELECT setval('"id_antrian_seq"', 282, true);
ALTER SEQUENCE "id_antrian_seq" OWNER TO "postgres";
ALTER SEQUENCE "id_dokter_seq"
OWNED BY "dokter"."id_dokter";
SELECT setval('"id_dokter_seq"', 10, true);
ALTER SEQUENCE "id_dokter_seq" OWNER TO "postgres";
ALTER SEQUENCE "id_register_antrian_seq"
OWNED BY "register_antrian"."id_registerantrian";
SELECT setval('"id_register_antrian_seq"', 27, true);
ALTER SEQUENCE "id_register_antrian_seq" OWNER TO "postgres";
ALTER SEQUENCE "id_register_dokter_seq"
OWNED BY "register_dokter"."id_register";
SELECT setval('"id_register_dokter_seq"', 27, true);
ALTER SEQUENCE "id_register_dokter_seq" OWNER TO "postgres";
ALTER SEQUENCE "id_ruang_seq"
OWNED BY "ruang"."id_ruang";
SELECT setval('"id_ruang_seq"', 5, true);
ALTER SEQUENCE "id_ruang_seq" OWNER TO "postgres";
SELECT setval('"no_rekam_medis"', 133, true);
ALTER SEQUENCE "no_rekam_medis" OWNER TO "postgres";
ALTER SEQUENCE "pasien_id_pasien_seq"
OWNED BY "pasien"."id_pasien";
SELECT setval('"pasien_id_pasien_seq"', 34, true);
ALTER SEQUENCE "pasien_id_pasien_seq" OWNER TO "postgres";
ALTER SEQUENCE "poli_id_poli_seq"
OWNED BY "poli"."id_poli";
SELECT setval('"poli_id_poli_seq"', 249, true);
ALTER SEQUENCE "poli_id_poli_seq" OWNER TO "postgres";
ALTER SEQUENCE "user_data_header_iduser_seq1"
OWNED BY "user_data_header"."iduser";
SELECT setval('"user_data_header_iduser_seq1"', 2, false);
ALTER SEQUENCE "user_data_header_iduser_seq1" OWNER TO "postgres";
ALTER SEQUENCE "user_data_header_iduser_seq"
OWNED BY "user_data_header"."iduser";
SELECT setval('"user_data_header_iduser_seq"', 3, false);
ALTER SEQUENCE "user_data_header_iduser_seq" OWNER TO "postgres";
...@@ -84,6 +84,22 @@ class AdminController extends \Application\Master\GlobalActionController ...@@ -84,6 +84,22 @@ class AdminController extends \Application\Master\GlobalActionController
$this->layout("layout/layoutAdmin"); $this->layout("layout/layoutAdmin");
return $view; return $view;
} }
public function registrasialldokAction()
{
$this->isLoggedIn();
$view = new ViewModel();
$result = new Result();
/* get url */
$uri = $this->getRequest()->getUri();
$baseurl = sprintf('//%s', $uri->getHost());
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendFile('/action-js/antrian-js/action-registrasialldok.js');
$this->layout("layout/layoutAdmin");
return $view;
}
public function antrianterlewatAction() public function antrianterlewatAction()
......
...@@ -223,7 +223,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -223,7 +223,6 @@ class ApiController extends \Application\Master\GlobalActionController {
$dataArrayAntrianPasien = array ( $dataArrayAntrianPasien = array (
'id_pasien' => $id, 'id_pasien' => $id,
'create_date' => gmdate("Y-m-d H:i:s", time()+60*60*7),
'nama' => $nama, 'nama' => $nama,
'tempat_lahir' => $tempat_lahir, 'tempat_lahir' => $tempat_lahir,
'tanggal_lahir' => $tanggal_lahir, 'tanggal_lahir' => $tanggal_lahir,
...@@ -242,7 +241,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -242,7 +241,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$id_antrian = $register->data[0]['id_antrian']; $id_antrian = $register->data[0]['id_antrian'];
$whereidantrian = 'id_antrian='.$id_antrian; $whereidantrian = 'id_antrian='.$id_antrian;
// print_r($id_antrian);die; // print_r($register);die;
$param->updateGlobal($table_antrianpasien, $dataArrayAntrianPasien , $whereidantrian); $param->updateGlobal($table_antrianpasien, $dataArrayAntrianPasien , $whereidantrian);
...@@ -294,13 +293,33 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -294,13 +293,33 @@ class ApiController extends \Application\Master\GlobalActionController {
$antrian_all = $post->iantrian_all; $antrian_all = $post->iantrian_all;
$waktu_antrian = $post->iwaktu_antrian; $waktu_antrian = $post->iwaktu_antrian;
$jam_mulai = $post->ijam_mulai; $jam_mulai = $post->ijam_mulai;
$tanggal_buka =$post->itanggal_buka; // print_r($antrian_all); die;
$array = array(); $array = array();
$seqBefore1 = $param->getLastSeqPostgree($tb_register_dokter ,'id_register'); $seqBefore1 = $param->getLastSeqPostgree($tb_register_dokter ,'id_register');
$dataArrayRegisterDokter= array (
'create_date' => gmdate("Y-m-d H:i:s", time()+60*60*7),
'id_ruang' => $ruang,
'id_poli' => $poli,
'id_dokter' => $dokter,
'antrian_all' => $antrian_all,
'waktu_antrian' => $waktu_antrian,
'id_condition' =>1,
'jam_mulai' => $jam_mulai,
);
$dataArrayRegisterAntrian= array (
'create_date' => gmdate("Y-m-d H:i:s", time()+60*60*7),
'antrian_all' => $antrian_all,
'waktu_antrian' => $waktu_antrian,
'jam_mulai' => $jam_mulai,
);
$dataArrayDokter = array( $dataArrayDokter = array(
'id_condition' => 2, 'id_condition' => 2,
); );
...@@ -368,11 +387,9 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -368,11 +387,9 @@ class ApiController extends \Application\Master\GlobalActionController {
//untuk load data id register di table antrian register lalu menambahkan pada table pasien //untuk load data id register di table antrian register lalu menambahkan pada table pasien
for ($noantrian=1; $noantrian <= $antrian_all;){ for ($noantrian=1; $noantrian <= $antrian_all;){
$dataArrayAntrianPasien = array ( $dataArrayAntrianPasien = array (
'id_register' => $seqAfter1->data['total'], 'id_register' => $seqAfter1->data['total'],
'create_date' => $date, 'create_date' => gmdate("Y-m-d H:i:s", time()+60*60*7),
'no_antrian' => $noantrian, 'no_antrian' => $noantrian,
'id_poli' => $poli, 'id_poli' => $poli,
...@@ -385,14 +402,22 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -385,14 +402,22 @@ class ApiController extends \Application\Master\GlobalActionController {
'create_date' => gmdate("Y-m-d H:i:s", time()+60*60*7), 'create_date' => gmdate("Y-m-d H:i:s", time()+60*60*7),
'no_antrian' => $noantrian, 'no_antrian' => $noantrian,
); );
$param->saveGlobal($dataArrayAntrianPasien, $tb_antrian_pasien); $param->saveGlobal($dataArrayAntrianPasien, $tb_antrian_pasien);
$param->saveGlobal($dataArrayAntrian, $tb_antrian); $param->saveGlobal($dataArrayAntrian, $tb_antrian);
$noantrian++; $noantrian++;
} }
$seqAfter2 = $param->getLastSeqPostgree($tb_antrian_pasien, 'id_antrian'); $seqAfter2 = $param->getLastSeqPostgree($tb_antrian_pasien, 'id_antrian');
if($seqAfter2->data['total'] > $seqBefore2->data['total']){ if($seqAfter2->data['total'] > $seqBefore2->data['total']){
...@@ -457,6 +482,33 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -457,6 +482,33 @@ class ApiController extends \Application\Master\GlobalActionController {
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
public function loadantrianregisterallAction(){
$result = new Result();
$request = $this->getRequest();
$post = $request->getPost();
//$name = $this->isFieldMandatory(@$data['name'], 'name');
$storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig());
$test = new \Application\Model\Param($storage);
$load = $test->loadantrianregisterall($post->id);
// print_r($load);die;
if($load->code == 0){
$result->code = $result::CODE_SUCCESS;
$result->info = $result::INFO_SUCCESS;
$result->data = $load->data;
}else{
$result->code = 1;
$result->info = 'Not Found';
}
return $this->getOutput($result->toJson());
}
public function editdataregisterAction(){ public function editdataregisterAction(){
if($this->isLoggedIn()){ if($this->isLoggedIn()){
$result = new Result(); $result = new Result();
...@@ -475,10 +527,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -475,10 +527,7 @@ class ApiController extends \Application\Master\GlobalActionController {
try{ try{
$id_register = $post->id; $id_register = $post->id;
$antrian_all = $post->iantrial_all; $antrian_all = $post->iantrial_all;
$antrian_awal = $post->iantrian_awal;
$antrian_akhir = $post->iantrian_akhir;
$waktu_antrian = $post->iwaktu_antrian; $waktu_antrian = $post->iwaktu_antrian;
$jam_mulai = $post->ijam_mulai; $jam_mulai = $post->ijam_mulai;
...@@ -487,8 +536,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -487,8 +536,6 @@ class ApiController extends \Application\Master\GlobalActionController {
'antrian_all' =>$antrian_all, 'antrian_all' =>$antrian_all,
'antrian_awal' =>$antrian_awal,
'antrian_akhir' =>$antrian_akhir,
'waktu_antrian' =>$waktu_antrian, 'waktu_antrian' =>$waktu_antrian,
'jam_mulai' =>$jam_mulai, 'jam_mulai' =>$jam_mulai,
...@@ -525,8 +572,8 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -525,8 +572,8 @@ class ApiController extends \Application\Master\GlobalActionController {
// } // }
$load = $param->loadRegister($post->id); $load = $param->loadantrianregister($post->id);
// print_r($dataArrayRegister);die;
$table_register= 'register_dokter'; $table_register= 'register_dokter';
$where = 'id_register='.$id_register; $where = 'id_register='.$id_register;
// print_r ($where);die; // print_r ($where);die;
...@@ -558,7 +605,9 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -558,7 +605,9 @@ class ApiController extends \Application\Master\GlobalActionController {
$storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig()); $storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig());
$test = new \Application\Model\Param($storage); $test = new \Application\Model\Param($storage);
$tabel = 'antrian_pasien';
$where = 'id_register='.$post->id;
$res = $test->deleteGlobal($tabel, $where);
$tabel = 'register_dokter'; $tabel = 'register_dokter';
$where = 'id_register='.$post->id; $where = 'id_register='.$post->id;
$res = $test->deleteGlobal($tabel, $where); $res = $test->deleteGlobal($tabel, $where);
...@@ -685,8 +734,8 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -685,8 +734,8 @@ class ApiController extends \Application\Master\GlobalActionController {
try{ try{
$fileupload = $_FILES['fileupload']['tmp_name']; $fileupload = $_FILES['fileupload']['tmp_name'];
$id_poli = $post->id_poli;
$id_poli = $post->id_poli;
$nama_poli = $post->inama_poli; $nama_poli = $post->inama_poli;
$kode_poli = $post->ikode_poli; $kode_poli = $post->ikode_poli;
$deskripsi_poli = $post->ideskripsi_poli; $deskripsi_poli = $post->ideskripsi_poli;
...@@ -706,7 +755,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -706,7 +755,7 @@ class ApiController extends \Application\Master\GlobalActionController {
if (move_uploaded_file($_FILES['fileupload']['tmp_name'],$alamatfile)){ if (move_uploaded_file($_FILES['fileupload']['tmp_name'],$alamatfile)){
/* jika upload berhasil ke folder sever */ /* jika upload berhasil ke folder sever */
$dataArrayPoli = array ( $dataArrayPoli = array(
'nama_poli' => $nama_poli, 'nama_poli' => $nama_poli,
'image_poli' => $ImageName, 'image_poli' => $ImageName,
...@@ -723,7 +772,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -723,7 +772,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$result->code = 0; $result->code = 0;
$result->info = 'ok'; $result->info = 'ok';
$result->data = $load->data;
}else{ }else{
...@@ -733,7 +782,16 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -733,7 +782,16 @@ class ApiController extends \Application\Master\GlobalActionController {
}else{ }else{
$result->info = 'File tidak boleh kosong'; $dataArrayPoli = array(
'nama_poli' => $nama_poli,
'deskripsi_poli' => $deskripsi_poli,
'kode_poli' => $kode_poli,
);
$table_poli = 'poli';
$where = 'id_poli='.$id_poli;
$param->updateGlobal($table_poli, $dataArrayPoli, $where);
} }
...@@ -911,11 +969,11 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -911,11 +969,11 @@ class ApiController extends \Application\Master\GlobalActionController {
$fileupload = $_FILES['fileupload']['tmp_name']; $fileupload = $_FILES['fileupload']['tmp_name'];
$id_dokter = $post->id_dokter; $id_dokter = $post->id_dokter;
// print_r($id_dokter);die;
$nama_dokter = $post->inama_dokter; $nama_dokter = $post->inama_dokter;
$kode_dokter = $post->ikode_dokter; $kode_dokter = $post->ikode_dokter;
$poli = $post->ipoli; $poli = $post->ipoli;
$condition = $post->icondition;
if (!empty($fileupload)){ if (!empty($fileupload)){
$ImageName = $_FILES['fileupload']['name']; $ImageName = $_FILES['fileupload']['name'];
...@@ -938,13 +996,14 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -938,13 +996,14 @@ class ApiController extends \Application\Master\GlobalActionController {
'nama_dokter' => $nama_dokter, 'nama_dokter' => $nama_dokter,
'kode_dokter' =>$kode_dokter, 'kode_dokter' =>$kode_dokter,
'id_poli' =>$poli, 'id_poli' =>$poli,
'id_condition' =>$condition,
'image_dokter' => $ImageName, 'image_dokter' => $ImageName,
); );
$Dokter = array ( $Dokter = array (
'nama_dokter' => $nama_dokter, 'nama_dokter' => $nama_dokter,
...@@ -957,13 +1016,11 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -957,13 +1016,11 @@ class ApiController extends \Application\Master\GlobalActionController {
$table_dokter_to_poli= 'dokter_to_poli'; $table_dokter_to_poli= 'dokter_to_poli';
$where = 'id_dokter='.$id_dokter; $where = 'id_dokter='.$id_dokter;
$param->updateGlobal($table_dokter_to_poli, $DokterPoli, $where); $param->updateGlobal($table_dokter_to_poli, $DokterPoli, $where);
$table_dokter= 'dokter'; $table_dokter= 'dokter';
$where = 'id_dokter='.$id_dokter; $where = 'id_dokter='.$id_dokter;
$param->updateGlobal($table_dokter, $Dokter, $where); $param->updateGlobal($table_dokter, $Dokter, $where);
$result->code = 0; $result->code = 0;
...@@ -977,7 +1034,33 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -977,7 +1034,33 @@ class ApiController extends \Application\Master\GlobalActionController {
}else{ }else{
$result->info = 'File tidak boleh kosong'; $DokterPoli = array (
'nama_dokter' => $nama_dokter,
'kode_dokter' =>$kode_dokter,
'id_poli' =>$poli,
);
$Dokter = array (
'nama_dokter' => $nama_dokter,
'kode_dokter' =>$kode_dokter,
);
$load = $param->loadkeloladokter($post->id);
$table_dokter_to_poli= 'dokter_to_poli';
$where = 'id_dokter='.$id_dokter;
$param->updateGlobal($table_dokter_to_poli, $DokterPoli, $where);
$table_dokter= 'dokter';
$where = 'id_dokter='.$id_dokter;
$param->updateGlobal($table_dokter, $Dokter, $where);
$result->code = 0;
$result->info = 'ok';
} }
...@@ -992,6 +1075,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -992,6 +1075,7 @@ class ApiController extends \Application\Master\GlobalActionController {
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
public function deletekeloladokterAction(){ public function deletekeloladokterAction(){
$result = new Result(); $result = new Result();
$request = $this->getRequest(); $request = $this->getRequest();
...@@ -1112,7 +1196,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1112,7 +1196,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$nama_ruang = $post->inama_ruang; $nama_ruang = $post->inama_ruang;
$poli = $post->ipoli; $poli = $post->ipoli;
$lantai = $post->ilantai; $lantai = $post->ilantai;
$condition = $post->icondition;
...@@ -1121,8 +1205,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1121,8 +1205,6 @@ class ApiController extends \Application\Master\GlobalActionController {
'nama_ruang' =>$nama_ruang, 'nama_ruang' =>$nama_ruang,
'id_poli' =>$poli, 'id_poli' =>$poli,
'lantai' =>$lantai, 'lantai' =>$lantai,
'id_condition' =>$condition,
); );
$load = $param->loadkelolaruang($post->id); $load = $param->loadkelolaruang($post->id);
...@@ -1281,9 +1363,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1281,9 +1363,6 @@ class ApiController extends \Application\Master\GlobalActionController {
'tempat_lahir' =>$tempat_lahir, 'tempat_lahir' =>$tempat_lahir,
'alamat' =>$alamat, 'alamat' =>$alamat,
'no_hp' =>$no_hp, 'no_hp' =>$no_hp,
); );
...@@ -1337,6 +1416,108 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1337,6 +1416,108 @@ class ApiController extends \Application\Master\GlobalActionController {
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
public function updateconditiondokAction(){
if($this->isLoggedIn()){
$result = new Result();
$request = $this->getRequest();
$post = $request->getPost();
if ($request->isPost()) {
$storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig());
$param = new \Application\Model\Param($storage);
try{
$id_dokter = $post->id_dokter;
$id_condition = $post->id_condition;
// print_r( $id_dokter);die;
// print_r( $id_condition);die;
if($id_condition == 1){
$datacondition = array (
'id_condition' => 2,
);
}else{
$datacondition = array (
'id_condition' => 1,
);
}
// print_r($post->id);die;
$tabledok= 'dokter_to_poli';
$where = 'id_dokter='.$id_dokter;
$param->updateGlobal($tabledok, $datacondition, $where);
$result->code = 0;
$result->info = 'ok';
}catch (\Exception $exc) {
$result = new Result(0,1,$exc->getMessage() .'-'.$exc->getTraceAsString());
}
}else{
$result = new Result(0,401,'Silahkan masuk untuk melanjutkan');
}
}
return $this->getOutput($result->toJson());
}
public function updateconditionruangAction(){
if($this->isLoggedIn()){
$result = new Result();
$request = $this->getRequest();
$post = $request->getPost();
if ($request->isPost()) {
$storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig());
$param = new \Application\Model\Param($storage);
try{
$id_ruang = $post->id_ruang;
$id_condition = $post->id_condition;
// print_r( $id_dokter);die;
// print_r( $id_condition);die;
if($id_condition == 1){
$datacondition = array (
'id_condition' => 2,
);
}else{
$datacondition = array (
'id_condition' => 1,
);
}
// print_r($post->id);die;
$tableruang= 'ruang';
$where = 'id_ruang='.$id_ruang;
$param->updateGlobal($tableruang, $datacondition, $where);
$result->code = 0;
$result->info = 'ok';
}catch (\Exception $exc) {
$result = new Result(0,1,$exc->getMessage() .'-'.$exc->getTraceAsString());
}
}else{
$result = new Result(0,401,'Silahkan masuk untuk melanjutkan');
}
}
return $this->getOutput($result->toJson());
}
public function loadpasienAction(){ public function loadpasienAction(){
$result = new Result(); $result = new Result();
...@@ -1487,6 +1668,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1487,6 +1668,7 @@ class ApiController extends \Application\Master\GlobalActionController {
// $id = $this->_getParam($test->loadAntrian($post->id_poli)); // $id = $this->_getParam($test->loadAntrian($post->id_poli));
$load = $test->loadAntrian($post->id_poli); $load = $test->loadAntrian($post->id_poli);
// print_r($post->id_poli);die;
if($load->code == 0){ if($load->code == 0){
$result->code = $result::CODE_SUCCESS; $result->code = $result::CODE_SUCCESS;
...@@ -1537,7 +1719,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1537,7 +1719,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$load = $poli->loadPoli($post->$id_poli); $load = $poli->loadPoli($post->$id_poli);
// print_r($post->$id_poli);die;
if($load->code == 0){ if($load->code == 0){
...@@ -1587,8 +1769,10 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1587,8 +1769,10 @@ class ApiController extends \Application\Master\GlobalActionController {
$iddokter = $post->iddok; $iddokter = $post->iddok;
$id_poli = $post->id_poli;
$load = $dokter->loadPilihAntrian($iddokter); // print_r($id_pasien);die;
$load = $dokter->loadPilihAntrian($iddokter, $id_poli);
$listdata = array(); $listdata = array();
...@@ -1609,6 +1793,34 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1609,6 +1793,34 @@ class ApiController extends \Application\Master\GlobalActionController {
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
public function valpilihAntrianAction(){
$result = new Result();
$request = $this->getRequest();
$post = $request->getPost();
$storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig());
$dokter = new \Application\Model\Param($storage);
$id_pasien = $post->id_pasien;
// print_r($id_pasien);die;
$load = $dokter->valpilihAntrian($id_pasien);
// print_r($listdata);die;
if($load->code == 0){
$result->code = $result::CODE_SUCCESS;
$result->info = $result::INFO_SUCCESS;
$result->data = $load->data;
}else{
$result->code = 1;
$result->info = 'Not Found';
}
return $this->getOutput($result->toJson());
}
public function LoadAntrianAdminAction(){ public function LoadAntrianAdminAction(){
$result = new Result(); $result = new Result();
...@@ -1770,7 +1982,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1770,7 +1982,6 @@ class ApiController extends \Application\Master\GlobalActionController {
$dataarray = array( $dataarray = array(
'id_pasien' => null, 'id_pasien' => null,
'create_date' => null,
'nama' => null, 'nama' => null,
'tempat_lahir' => null, 'tempat_lahir' => null,
'tanggal_lahir' => null, 'tanggal_lahir' => null,
......
...@@ -70,7 +70,7 @@ class UmumController extends \Application\Master\GlobalActionController ...@@ -70,7 +70,7 @@ class UmumController extends \Application\Master\GlobalActionController
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"'); $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var id_poli = "' . $decodeid . '"'); $this->headScript->appendScript(' var id_poli = "' . $decodeid . '"');
$this->headScript->appendFile('/action-js/antrian-js/action-umumtampilan.js'); $this->headScript->appendFile('/action-js/tampilanantiran-js/action-umumtampilan.js');
$this->layout("layout/layoutUmum"); $this->layout("layout/layoutUmum");
return $view; return $view;
......
...@@ -102,10 +102,15 @@ class Param extends Mapper { ...@@ -102,10 +102,15 @@ class Param extends Mapper {
return $data; return $data;
} }
public function loadRegister($id = null){ public function loadantrianregister($id = null){
$data = $this->_storage->loadRegisterAntrianData($id); $data = $this->_storage->loadantrianregister($id);
return $data;
}
public function loadantrianregisterall($id = null){
$data = $this->_storage->loadantrianregisterall($id);
return $data; return $data;
} }
public function loadkelolapoli($id = null){ public function loadkelolapoli($id = null){
$data = $this->_storage->loadkelolapoli($id); $data = $this->_storage->loadkelolapoli($id);
return $data; return $data;
...@@ -144,8 +149,12 @@ class Param extends Mapper { ...@@ -144,8 +149,12 @@ class Param extends Mapper {
$data = $this->_storage->loadantrianunregis($id); $data = $this->_storage->loadantrianunregis($id);
return $data; return $data;
} }
public function loadPilihAntrian($iddok = null){ public function loadPilihAntrian($iddok = null , $id_poli= null ){
$data = $this->_storage->loadPilihAntrian($iddok); $data = $this->_storage->loadPilihAntrian($iddok, $id_poli);
return $data;
}
public function valpilihAntrian($id_pasien = null ){
$data = $this->_storage->valpilihAntrian($id_pasien);
return $data; return $data;
} }
public function loadDokter($id = null){ public function loadDokter($id = null){
......
...@@ -322,13 +322,14 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -322,13 +322,14 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT antrian_pasien.nama, antrian_pasien.no_antrian,antrian_pasien.no_rekam_medis, dokter_to_poli.nama_dokter, poli.nama_poli , dokter_to_poli.kode_dokter,antrian_pasien.id_pasien, dokter_to_poli.id_dokter,antrian_pasien.sisa_antrian $sql = " SELECT antrian_pasien.id_pasien, antrian_pasien.nama, antrian_pasien.no_antrian,antrian_pasien.no_rekam_medis, dokter_to_poli.nama_dokter, poli.nama_poli , dokter_to_poli.kode_dokter, dokter_to_poli.id_dokter,antrian_pasien.sisa_antrian, antrian_pasien.create_date
FROM antrian_pasien FROM antrian_pasien
INNER JOIN dokter_to_poli INNER JOIN dokter_to_poli
ON antrian_pasien.id_dokter = dokter_to_poli.id_dokter ON antrian_pasien.id_dokter = dokter_to_poli.id_dokter
INNER JOIN poli INNER JOIN poli
ON antrian_pasien.id_poli = poli.id_poli ON antrian_pasien.id_poli = poli.id_poli
WHERE antrian_pasien.id_antrian = $id WHERE antrian_pasien.id_antrian = $id
"; ";
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
...@@ -448,7 +449,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -448,7 +449,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$sql = " SELECT COUNT(id_pasien) $sql = " SELECT COUNT(id_pasien)
FROM antrian_pasien FROM antrian_pasien
WHERE id_pasien is not null AND WHERE id_pasien is not null AND create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR' AND
id_dokter =$id AND (status_code <> 50 and status_code <> 60) and no_antrian < $no"; id_dokter =$id AND (status_code <> 50 and status_code <> 60) and no_antrian < $no";
...@@ -563,7 +564,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -563,7 +564,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
try { try {
$sql = " SELECT dp.id_dokter, dp.nama_dokter,ap.id_dokter, count (ap.id_dokter) as total from antrian_pasien ap, dokter_to_poli dp $sql = " SELECT dp.id_dokter, dp.nama_dokter,ap.id_dokter, count (ap.id_dokter) as total from antrian_pasien ap, dokter_to_poli dp
WHERE ap.id_poli = $id and dp.id_dokter = ap.id_dokter WHERE ap.id_poli = $id and dp.id_dokter = ap.id_dokter AND ap.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'
GROUP BY dp.id_dokter, ap.id_dokter "; GROUP BY dp.id_dokter, ap.id_dokter ";
...@@ -602,7 +603,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -602,7 +603,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT count(id_pasien) FROM antrian_pasien "; $sql = " SELECT count(id_pasien) FROM antrian_pasien WHERE create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR' ";
// print_r($sql);die; // print_r($sql);die;
...@@ -639,7 +640,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -639,7 +640,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT count(status_code) FROM antrian_pasien WHERE status_code= 60 "; $sql = " SELECT count(status_code) FROM antrian_pasien WHERE status_code= 60 AND create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR' ";
// print_r($sql);die; // print_r($sql);die;
...@@ -676,8 +677,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -676,8 +677,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT count(status_code) FROM antrian_pasien $sql = " SELECT count(status_code) FROM antrian_pasien WHERE status_code = 50 and create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR' ";
WHERE status_code = 50 ";
// print_r($sql);die; // print_r($sql);die;
...@@ -714,7 +714,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -714,7 +714,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = "SELECT id_antrian, id_dokter, no_antrian FROM antrian_pasien WHERE $where "; $sql = "SELECT id_antrian, id_dokter, no_antrian, create_date FROM antrian_pasien WHERE create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR' AND $where ";
// print_r($sql);die; // print_r($sql);die;
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
...@@ -752,11 +752,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -752,11 +752,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT p.id_pasien, ap.no_rekam_medis, ap.status_code,ap.no_antrian ,ap.no_antrian, ap.id_antrian, ap.nama FROM pasien p $sql = " SELECT id_pasien, no_rekam_medis FROM pasien
LEFT JOIN antrian_pasien ap
ON ap.id_pasien = p.id_pasien
WHERE p.no_rekam_medis = '$no_rekam_medis' "; WHERE no_rekam_medis = '$no_rekam_medis' ";
// print_r($sql);die; // print_r($sql);die;
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
...@@ -841,7 +839,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -841,7 +839,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT * FROM poli"; $sql = " SELECT * FROM poli
ORDER BY nama_poli ASC";
...@@ -996,11 +996,11 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -996,11 +996,11 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return $result; return $result;
} }
public function loadRegisterAntrianData($id = null){ public function loadantrianregister($id = null){
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT register_dokter.id_register, dokter_to_poli.nama_dokter, poli.nama_poli, ruang.nama_ruang,register_dokter.antrian_all,register_dokter.antrian_awal,register_dokter.antrian_akhir,register_dokter.waktu_antrian, register_dokter.create_date,register_dokter.jam_mulai $sql = " SELECT register_dokter.id_register, dokter_to_poli.nama_dokter, poli.nama_poli, ruang.nama_ruang,register_dokter.antrian_all,register_dokter.waktu_antrian, register_dokter.jam_mulai, register_dokter.create_date
FROM register_dokter FROM register_dokter
INNER JOIN poli INNER JOIN poli
ON register_dokter.id_poli = poli.id_poli ON register_dokter.id_poli = poli.id_poli
...@@ -1008,14 +1008,70 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1008,14 +1008,70 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
ON register_dokter.id_dokter = dokter_to_poli.id_dokter ON register_dokter.id_dokter = dokter_to_poli.id_dokter
INNER JOIN ruang INNER JOIN ruang
ON register_dokter.id_ruang = ruang.id_ruang ON register_dokter.id_ruang = ruang.id_ruang
Where register_dokter.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'
"; ";
if($id){ if($id){
$sql .= "WHERE register_dokter.id_register= $id AND register_dokter.id_register IS NOT NULL" ; $sql .= " AND register_dokter.id_register= $id AND register_dokter.id_register IS NOT NULL" ;
} }
$sql .= " ORDER BY poli.nama_poli asc , register_dokter.create_date"; $sql .= " ORDER BY poli.nama_poli asc , register_dokter.create_date";
// print_r($sql);die;
$stmt = $this->_db->query($sql);
$resdata = $stmt->execute();
$listdata = array();
foreach($resdata as $val){
// print_r($val);die;
array_push($listdata, $val);
}
if ($listdata) {
$result->code = 0;
$result->info = 'OK';
$result->data = $listdata;
}else{
$result->code = 1;
$result->info = 'nok';
}
}catch (\Zend\Db\Adapter\Exception\RuntimeException $ex) {
$result->code = 3;
$result->info = 'ERROR : ' . $ex->getMessage();
}catch (\Exception $ex) {
$result->code = 4;
$result->info = 'ERROR : ' . $ex->getMessage();
}
return $result;
}
public function loadantrianregisterall($id = null){
$result = new Result();
try {
$sql = " SELECT register_dokter.id_register, dokter_to_poli.nama_dokter, poli.nama_poli, ruang.nama_ruang,register_dokter.antrian_all,register_dokter.waktu_antrian, register_dokter.jam_mulai, register_dokter.create_date
FROM register_dokter
INNER JOIN poli
ON register_dokter.id_poli = poli.id_poli
INNER JOIN dokter_to_poli
ON register_dokter.id_dokter = dokter_to_poli.id_dokter
INNER JOIN ruang
ON register_dokter.id_ruang = ruang.id_ruang
";
if($id){
$sql .= " Where register_dokter.id_register= $id AND register_dokter.id_register IS NOT NULL" ;
}
$sql .= " ORDER BY poli.nama_poli asc , register_dokter.create_date";
// print_r($sql);die; // print_r($sql);die;
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
$resdata = $stmt->execute(); $resdata = $stmt->execute();
...@@ -1046,6 +1102,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1046,6 +1102,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
} }
return $result; return $result;
} }
public function loadkelolapasien($id = null){ public function loadkelolapasien($id = null){
$result = new Result(); $result = new Result();
try { try {
...@@ -1288,7 +1345,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1288,7 +1345,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = "SELECT antrian_pasien.no_antrian,antrian_pasien.id_pasien, antrian_pasien.nama, dokter_to_poli.kode_dokter , dokter_to_poli.nama_dokter, dokter_to_poli.id_dokter,poli.kode_poli, poli.nama_poli ,counter_status.status_code, counter_status.status_name $sql = "SELECT antrian_pasien.no_antrian,antrian_pasien.id_pasien,antrian_pasien.create_date, antrian_pasien.nama, dokter_to_poli.kode_dokter , dokter_to_poli.nama_dokter, dokter_to_poli.id_dokter,poli.kode_poli, poli.nama_poli ,counter_status.status_code, counter_status.status_name
FROM antrian_pasien FROM antrian_pasien
INNER JOIN poli INNER JOIN poli
ON poli.id_poli = antrian_pasien.id_poli ON poli.id_poli = antrian_pasien.id_poli
...@@ -1296,7 +1353,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1296,7 +1353,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
ON dokter_to_poli.id_dokter = antrian_pasien.id_dokter ON dokter_to_poli.id_dokter = antrian_pasien.id_dokter
INNER JOIN counter_status INNER JOIN counter_status
ON counter_status.status_code = antrian_pasien.status_code ON counter_status.status_code = antrian_pasien.status_code
WHERE antrian_pasien.id_pasien IS NOT NULL AND antrian_pasien.status_code=60 WHERE antrian_pasien.id_pasien IS NOT NULL AND antrian_pasien.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'AND antrian_pasien.status_code=60
"; ";
...@@ -1338,13 +1395,14 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1338,13 +1395,14 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = "SELECT antrian_pasien.id_pasien, antrian_pasien.nama, antrian_pasien.no_antrian,antrian_pasien.ktp,antrian_pasien.no_rekam_medis,poli.nama_poli,dokter_to_poli.nama_dokter,dokter_to_poli.id_dokter FROM antrian_pasien $sql = "SELECT antrian_pasien.id_pasien, antrian_pasien.nama, antrian_pasien.no_antrian,antrian_pasien.ktp,antrian_pasien.no_rekam_medis,poli.nama_poli,dokter_to_poli.nama_dokter,dokter_to_poli.id_dokter, antrian_pasien.create_date
FROM antrian_pasien
INNER JOIN poli INNER JOIN poli
on poli.id_poli = antrian_pasien.id_poli on poli.id_poli = antrian_pasien.id_poli
INNER JOIN dokter_to_poli INNER JOIN dokter_to_poli
on dokter_to_poli.id_dokter = antrian_pasien.id_dokter on dokter_to_poli.id_dokter = antrian_pasien.id_dokter
WHERE id_pasien IS NOT NULL WHERE id_pasien IS NOT NULL AND antrian_pasien.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'
ORDER BY poli.nama_poli asc ORDER BY poli.nama_poli asc
"; ";
...@@ -1386,7 +1444,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1386,7 +1444,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = "SELECT antrian_pasien.no_antrian,antrian_pasien.id_pasien, antrian_pasien.nama, dokter_to_poli.kode_dokter , dokter_to_poli.nama_dokter, dokter_to_poli.id_dokter,poli.kode_poli, poli.nama_poli , counter_status.status_name $sql = "SELECT antrian_pasien.no_antrian,antrian_pasien.id_pasien, antrian_pasien.nama, dokter_to_poli.kode_dokter , dokter_to_poli.nama_dokter, dokter_to_poli.id_dokter,poli.kode_poli, poli.nama_poli , counter_status.status_name, antrian_pasien.create_date
FROM antrian_pasien FROM antrian_pasien
INNER JOIN poli INNER JOIN poli
ON poli.id_poli = antrian_pasien.id_poli ON poli.id_poli = antrian_pasien.id_poli
...@@ -1394,7 +1452,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1394,7 +1452,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
ON dokter_to_poli.id_dokter = antrian_pasien.id_dokter ON dokter_to_poli.id_dokter = antrian_pasien.id_dokter
INNER JOIN counter_status INNER JOIN counter_status
ON counter_status.status_code = antrian_pasien.status_code ON counter_status.status_code = antrian_pasien.status_code
WHERE antrian_pasien.id_dokter=$iddok and antrian_pasien.id_pasien=$idpasien " WHERE antrian_pasien.id_dokter=$iddok and antrian_pasien.id_pasien=$idpasien AND antrian_pasien.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'";
; ;
...@@ -1436,23 +1494,23 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1436,23 +1494,23 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = " SELECT poli.id_poli, poli.nama_poli $sql = " SELECT poli.id_poli, poli.nama_poli, antrian_pasien.create_date
FROM antrian_pasien FROM antrian_pasien
INNER JOIN poli INNER JOIN poli
ON antrian_pasien.id_poli = poli.id_poli "; ON antrian_pasien.id_poli = poli.id_poli
WHERE antrian_pasien.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'
GROUP BY poli.id_poli, antrian_pasien.create_date";
if($id){
$sql .=" WHERE poli.id_poli=$id";
}
$sql .= " GROUP BY poli.id_poli";
//print_r($sql);die;
// print_r($sql);die;
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
$resdata = $stmt->execute(); $resdata = $stmt->execute();
...@@ -1665,18 +1723,18 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1665,18 +1723,18 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return $result; return $result;
} }
public function loadPilihAntrian($iddok ){ public function loadPilihAntrian($iddok, $id_poli){
$result = new Result(); $result = new Result();
try { try {
$sql = "SELECT antrian_pasien.no_antrian, antrian_pasien.id_pasien, register_dokter.waktu_antrian , register_dokter.jam_mulai, antrian_pasien.status_code $sql = "SELECT DISTINCT on (idd.no_antrian) idd.no_antrian,idd.no_antrian, idd.id_pasien , idd.create_date,rd.waktu_antrian, rd.jam_mulai, idd.status_code,rd.id_register,idd.id_poli,idd.id_dokter,idd.id_antrian,idd.nama
FROM antrian_pasien FROM antrian_pasien idd
INNER JOIN LEFT JOIN register_dokter rd
register_dokter on idd.id_register = rd.id_register
on antrian_pasien.id_dokter = register_dokter.id_dokter WHERE idd.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR' and idd.id_dokter =$iddok AND idd.id_poli= $id_poli ORDER BY no_antrian ASC" ;
WHERE antrian_pasien.id_dokter= $iddok ORDER BY no_antrian ASC" ;
// print_r($sql);die;
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
$resdata = $stmt->execute(); $resdata = $stmt->execute();
...@@ -1684,7 +1742,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1684,7 +1742,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$listdata = array(); $listdata = array();
foreach($resdata as $val){ foreach($resdata as $val){
// print_r($val);die;
array_push($listdata, $val); array_push($listdata, $val);
} }
...@@ -1709,11 +1767,55 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1709,11 +1767,55 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return $result; return $result;
} }
public function valpilihAntrian($id_pasien = null){
$result = new Result();
try {
$sql = "SELECT DISTINCT on (idd.no_antrian) idd.no_antrian,idd.no_antrian, idd.id_pasien , idd.create_date,rd.waktu_antrian, rd.jam_mulai, idd.status_code,rd.id_register,idd.id_poli,idd.id_dokter,idd.id_antrian,idd.nama
FROM antrian_pasien idd
LEFT JOIN register_dokter rd
on idd.id_register = rd.id_register
WHERE idd.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR' AND idd.id_pasien = $id_pasien";
// print_r($sql);die;
$stmt = $this->_db->query($sql);
$resdata = $stmt->execute();
$listdata = array();
foreach($resdata as $val){
// print_r($val);die;
array_push($listdata, $val);
}
if ($listdata) {
$result->code = 0;
$result->info = 'OK';
$result->data = $listdata;
}else{
$result->code = 1;
$result->info = 'nok';
}
}catch (\Zend\Db\Adapter\Exception\RuntimeException $ex) {
$result->code = 3;
$result->info = 'ERROR : ' . $ex->getMessage();
}catch (\Exception $ex) {
$result->code = 4;
$result->info = 'ERROR : ' . $ex->getMessage();
}
return $result;
}
public function loadAntrianAdmin($id = null){ public function loadAntrianAdmin($id = null){
$result = new Result(); $result = new Result();
try { try {
$sql = "SELECT antrian_pasien.no_antrian, antrian_pasien.nama, dokter_to_poli.kode_dokter , dokter_to_poli.nama_dokter, dokter_to_poli.id_dokter,poli.kode_poli, poli.nama_poli , counter_status.status_name, ruang.nama_ruang $sql = "SELECT antrian_pasien.no_antrian, antrian_pasien.nama, dokter_to_poli.kode_dokter , dokter_to_poli.nama_dokter, dokter_to_poli.id_dokter,poli.kode_poli, poli.nama_poli , counter_status.status_name, ruang.nama_ruang, antrian_pasien.create_date
FROM antrian_pasien FROM antrian_pasien
INNER JOIN poli INNER JOIN poli
ON poli.id_poli = antrian_pasien.id_poli ON poli.id_poli = antrian_pasien.id_poli
...@@ -1723,10 +1825,12 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1723,10 +1825,12 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
ON counter_status.status_code = antrian_pasien.status_code ON counter_status.status_code = antrian_pasien.status_code
INNER JOIN ruang INNER JOIN ruang
on ruang.id_ruang = antrian_pasien.id_ruang on ruang.id_ruang = antrian_pasien.id_ruang
WHERE antrian_pasien.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'
" ; " ;
if ($id){ if ($id){
$sql .= "WHERE antrian_pasien.id_pasien IS NOT NULL AND dokter_to_poli.id_dokter = $id AND antrian_pasien.status_code=10 ORDER BY no_antrian ASC "; $sql .= " AND antrian_pasien.id_pasien IS NOT NULL AND dokter_to_poli.id_dokter = $id AND antrian_pasien.status_code=10 ORDER BY no_antrian ASC";
} }
...@@ -1767,8 +1871,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1767,8 +1871,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
public function loadAntrian($id_poli){ public function loadAntrian($id_poli){
$result = new Result(); $result = new Result();
try { try {
$sql=" $sql="SELECT DISTINCT on (idd.id_dokter) idd.id_dokter,idd.no_antrian,dok.nama_dokter,pol.nama_poli,dok.kode_dokter,rur.nama_ruang ,idd.status_code,idd.id_poli , idd.create_date
SELECT DISTINCT on (idd.id_dokter) idd.id_dokter,idd.no_antrian,dok.nama_dokter,pol.nama_poli,dok.kode_dokter,rur.nama_ruang ,idd.status_code,idd.id_poli
FROM antrian_pasien idd FROM antrian_pasien idd
LEFT JOIN dokter_to_poli dok LEFT JOIN dokter_to_poli dok
...@@ -1780,14 +1883,14 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1780,14 +1883,14 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
LEFT JOIN counter_status cs LEFT JOIN counter_status cs
on cs.status_code = idd.status_code on cs.status_code = idd.status_code
WHERE idd.id_pasien is not null WHERE idd.id_pasien is not null AND idd.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'
and and
(cs.status_code=30 or cs.status_code =40) and (cs.status_code=30 or cs.status_code =40) and
idd.id_poli=$id_poli idd.id_poli=$id_poli
"; ";
// print_r($sql);die;
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
$resdata = $stmt->execute(); $resdata = $stmt->execute();
...@@ -1795,7 +1898,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1795,7 +1898,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$listdata = array(); $listdata = array();
foreach($resdata as $val){ foreach($resdata as $val){
// print_r($val);die;
array_push($listdata, $val); array_push($listdata, $val);
} }
...@@ -1824,7 +1927,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1824,7 +1927,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result = new Result(); $result = new Result();
try { try {
$sql = "SELECT antrian_pasien.no_antrian, antrian_pasien.id_dokter, dokter_to_poli.kode_dokter, counter_status.status_name,counter_status.status_code, ruang.nama_ruang $sql = "SELECT antrian_pasien.no_antrian, antrian_pasien.id_dokter, dokter_to_poli.kode_dokter, counter_status.status_name,counter_status.status_code, ruang.nama_ruang,antrian_pasien.create_date
FROM antrian_pasien FROM antrian_pasien
INNER JOIN counter_status INNER JOIN counter_status
ON counter_status.status_code = antrian_pasien.status_code ON counter_status.status_code = antrian_pasien.status_code
...@@ -1832,9 +1935,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -1832,9 +1935,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
ON dokter_to_poli.id_dokter = antrian_pasien.id_dokter ON dokter_to_poli.id_dokter = antrian_pasien.id_dokter
INNER JOIN ruang INNER JOIN ruang
ON ruang.id_ruang = antrian_pasien.id_ruang ON ruang.id_ruang = antrian_pasien.id_ruang
" ; WHERE antrian_pasien.create_date > CURRENT_TIMESTAMP - INTERVAL '24 HOUR'" ;
if ($id){ if ($id){
$sql .= "WHERE antrian_pasien.id_pasien IS NOT NULL AND dokter_to_poli.id_dokter = $id AND antrian_pasien.status_code=10 or dokter_to_poli.id_dokter = $id and antrian_pasien.status_code=30 or dokter_to_poli.id_dokter = $id and antrian_pasien.status_code=40 ORDER BY no_antrian ASC"; $sql .= " AND antrian_pasien.id_pasien IS NOT NULL AND dokter_to_poli.id_dokter = $id AND antrian_pasien.status_code=10 or dokter_to_poli.id_dokter = $id and antrian_pasien.status_code=30 or dokter_to_poli.id_dokter = $id and antrian_pasien.status_code=40 ORDER BY no_antrian ASC";
} }
$stmt = $this->_db->query($sql); $stmt = $this->_db->query($sql);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div><span style="visibility:hidden" id="nama_ruang"></span></div> <div><span style="visibility:hidden" id="nama_ruang"></span></div>
<div class="row col-lg-12"> <div class="row col-lg-12">
<div class="col-lg-6 "> <div class="col-lg-7 ">
<div class="card 0-hidden border-0 shadow-lg my-3"> <div class="card 0-hidden border-0 shadow-lg my-3">
<div class="card-header"> <div class="card-header">
<h6 class="panel-title"><i class="icon-cog3 position-left"></i> Nomor Antrian</h6> <h6 class="panel-title"><i class="icon-cog3 position-left"></i> Nomor Antrian</h6>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
</div> </div>
<div class="col-lg-6 "> <div class="col-lg-5 ">
<div class="card 1-hidden border-1 shadow-lg my-3"> <div class="card 1-hidden border-1 shadow-lg my-3">
<div class="card-header"> <div class="card-header">
<h6 class="panel-title"><i class="icon-cog3 position-left"></i> Nomor Antrian</h6> <h6 class="panel-title"><i class="icon-cog3 position-left"></i> Nomor Antrian</h6>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<div class="card-header"> <div class="card-header">
<h1 class="panel-title " style="font-family: Times New Roman, Times, serif;text-align:center">Daftar Antrian Hari ini<a class="heading-elements-toggle"></a></h1> <h1 class="panel-title " style="font-family: Times New Roman, Times, serif;text-align:center">Daftar Antrian Hari ini<a class="heading-elements-toggle"></a></h1>
</div> </div>
<table class="table table-bordered"> <table class="table table-bordered" >
<thead class="bgHeader" style="border-top: 2px solid #ccc;"> <thead class="bgHeader" style="border-top: 2px solid #ccc;">
<tr> <tr>
<th style="width: 70px">NO</th> <th style="width: 70px">NO</th>
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<th colspan="" class=" thLeftText">Nama Poli</th> <th colspan="" class=" thLeftText">Nama Poli</th>
<th colspan="" class=" thLeftText">Nama Dokter</th> <th colspan="" class=" thLeftText">Nama Dokter</th>
<th colspan="" class=" thLeftText">Kode Dokter</th> <th colspan="" class=" thLeftText">Kode Dokter</th>
<th colspan="" class=" thLeftText">Kondisi Dokter</th>
<th colspan="" class=" thLeftText">Gambar Dokter</th> <th colspan="" class=" thLeftText">Gambar Dokter</th>
<th colspan="" class=" thLeftText">Kondisi Dokter</th>
<th colspan="" class=" thLeftText">Action</th> <th colspan="" class=" thLeftText">Action</th>
</tr> </tr>
</thead> </thead>
...@@ -111,12 +111,7 @@ ...@@ -111,12 +111,7 @@
<label>Kode Dokter</label> <label>Kode Dokter</label>
<input type="input" id="kode_dokteredt" name="kode_dokter" class="form-control" required /></input> <input type="input" id="kode_dokteredt" name="kode_dokter" class="form-control" required /></input>
</div> </div>
<div class="form-group">
<label>Kondisi</label>
<select name="condition" id="condition" class="form-control" >
</select>
</div>
<div class="form-group " > <div class="form-group " >
<label>Gambar Dokter</label> <label>Gambar Dokter</label>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Edit Data Dokter</h4> <h4 class="modal-title">Edit Data Pasien</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
......
...@@ -109,12 +109,7 @@ ...@@ -109,12 +109,7 @@
<label>Ruangan</label> <label>Ruangan</label>
<input type="input" id="nama_ruangedt" name="nama_ruang" class="form-control" placeholder="Lantai Ruangan & Nama Ruangan" required /></input> <input type="input" id="nama_ruangedt" name="nama_ruang" class="form-control" placeholder="Lantai Ruangan & Nama Ruangan" required /></input>
</div> </div>
<div class="form-group">
<label>Kondisi</label>
<select name="condition" id="condition" class="form-control" >
</select>
</div>
<div class="modal-footer"> <div class="modal-footer">
<button button type="button" class="btn btn-primary" id="edit">Edit</button> <button button type="button" class="btn btn-primary" id="edit">Edit</button>
<button button type="button" class="btn btn-danger" onclick="reset()">Reset</button> <button button type="button" class="btn btn-danger" onclick="reset()">Reset</button>
......
<div class="container-fluid">
<div class="col-xl-12 col-lg-12 col-md-12">
<div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body ">
<h1 class="h4 text-center text-gray-900 mb-4" style="font-size: 50px;font-weight: bold">Seluruh Data Jadwal Dokter </h1>
<br>
<br>
<table class="table table-bordered" id="dataTable">
<thead>
<tr class="table-infos">
<th style="">NO</th>
<th >Nama Poli</th>
<th >Nama Dokter</th>
<th>Ruangan</th>
<th >Antrian Seluruh</th>
<th>Jam Mulai</th>
<th >Waktu Antrian</th>
<th >Tanggal Antrian</th>
<th >Action</th>
</tr>
</thead>
<tbody id="tableregisterdokter" >
</tbody>
</table>
</div>
</div>
</div>
</div>
...@@ -4,24 +4,23 @@ ...@@ -4,24 +4,23 @@
<div class="col-xl-12 col-lg-12 col-md-12"> <div class="col-xl-12 col-lg-12 col-md-12">
<div class="card o-hidden border-0 shadow-lg my-5"> <div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body "> <div class="card-body ">
<h1 class="h4 text-center text-gray-900 mb-4" style="font-size: 50px;font-weight: bold">Register Dokter</h1> <h1 class="h4 text-center text-gray-900 mb-4" style="font-size: 50px;font-weight: bold">Kelola Jadwal Dokter</h1>
<button type="button" class="btn btn-primary fa fa-plus btn-lg" data-toggle="modal" data-target="#addData" id="tambahmodal"> Tambah</button> <button type="button" class="btn btn-primary fa fa-plus btn-lg" data-toggle="modal" data-target="#addData" id="tambahmodal"> Tambah</button>
<a type="button" class="btn btn-dark fa btn-lg" href="<?php echo $this->basePath('admin/registrasialldok') ?>"> Lihat Seluruh Antrian</a>
<br> <br>
<br> <br>
<table class="table table-bordered" id="dataTable"> <table class="table table-bordered" id="dataTable">
<thead> <thead>
<tr class="table-infos"> <tr class="table-infos">
<th style="">NO</th> <th style="">NO</th>
<th colspan="" class=" thLeftText">Nama Poli</th> <th >Nama Poli</th>
<th colspan="" class=" thLeftText">Nama Dokter</th> <th >Nama Dokter</th>
<th colspan="" class=" thLeftText">Ruangan</th> <th>Ruangan</th>
<th colspan="" class=" thLeftText">Antrian Seluruh</th> <th >Antrian Seluruh</th>
<th colspan="" class=" thLeftText">Antrian Awal (mobile)</th> <th>Jam Mulai</th>
<th colspan="" class=" thLeftText">Antrian Akhir (mobile)</th> <th >Waktu Antrian</th>
<th colspan="" class=" thLeftText">Jam Mulai</th> <th >Tanggal Antrian</th>
<th colspan="" class=" thLeftText">Waktu Antrian</th> <th >Action</th>
<th colspan="" class=" thLeftText">Tanggal Antrian</th>
<th colspan="" class=" thLeftText">Action</th>
</tr> </tr>
</thead> </thead>
<tbody id="tableregisterdokter" > <tbody id="tableregisterdokter" >
...@@ -42,7 +41,7 @@ ...@@ -42,7 +41,7 @@
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Tambah Data Register Dokter</h4> <h4 class="modal-title">Tambah Jadwal Dokter</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
...@@ -74,6 +73,7 @@ ...@@ -74,6 +73,7 @@
<label>Antrian Seluruh</label> <label>Antrian Seluruh</label>
<input type="number" id="antrian_all" name="antrian_all" class="form-control" required /></input> <input type="number" id="antrian_all" name="antrian_all" class="form-control" required /></input>
</div> </div>
<div class="row col-lg-12"> <div class="row col-lg-12">
<div class="form-group"> <div class="form-group">
<label>Waktu Mulai Antrian</label> <label>Waktu Mulai Antrian</label>
...@@ -111,13 +111,13 @@ ...@@ -111,13 +111,13 @@
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Edit Data Register Dokter</h4> <h4 class="modal-title">Edit Jadwal Dokter</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form id="myForm" > <form id="myForm" >
<input type="input" id="id_register" class="form-control" /></input> <input type="hidden" id="id_register" class="form-control" /></input>
<div class="form-group"> <div class="form-group">
<label>Nama Poli</label> <label>Nama Poli</label>
...@@ -148,6 +148,7 @@ ...@@ -148,6 +148,7 @@
<input type="number" id="antrian_alledt" name="antrian_all" class="form-control" required /></input> <input type="number" id="antrian_alledt" name="antrian_all" class="form-control" required /></input>
</div> </div>
<div class="row col-lg-12"> <div class="row col-lg-12">
<div class="form-group"> <div class="form-group">
<label>Waktu Mulai Antrian</label> <label>Waktu Mulai Antrian</label>
......
...@@ -40,15 +40,12 @@ input::-webkit-inner-spin-button { ...@@ -40,15 +40,12 @@ input::-webkit-inner-spin-button {
<form id="myForm"> <form id="myForm">
<input type="hidden" id="iInput" class="form-control" /></input> <input type="hidden" id="iInput" class="form-control" /></input>
<div class="form-group"> <div class="form-group">
<label> <h5>No Rekam Medis</h5></label><br> <label> <h5>No Rekam Medis</h5></label><br>
<input type="text" id="no_rekam_medis" placeholder="No Rekam Medis" class="form-control" ></input> <input type="text" id="no_rekam_medis" class="form-control" placeholder="No Rekam Medis" class="form-control" max="999999999999999" maxlength="8"></input>
</div> </div>
<!-- <div class="form-group">
<label> <h5>No Induk Kependudukan (NIK)</h5></label><br>
<input type="number" id="ktp" placeholder="No Induk Kependudukan (NIK)" class="form-control"max="9999999999999999" maxlength="16" ></input>
</div> -->
<p class="card-text" style="display:inline">Jika belum mempunyai no rekam medis, </p> <p class="card-text" style="display:inline">Jika belum mempunyai no rekam medis, </p>
<a class="card-text" href="<?php echo $this->basePath('queue/daftarpasien') ?>" style="display:inline">Klik disini !</a> <a class="card-text" href="<?php echo $this->basePath('queue/daftarpasien') ?>" style="display:inline">Klik disini !</a>
</form> </form>
......
...@@ -223,16 +223,21 @@ input[type="done"] + label { ...@@ -223,16 +223,21 @@ input[type="done"] + label {
<!-- Modal --> <!-- Modal -->
<div class="modal fade modalPalingesar" id="pilihantrian" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade modalPalingesar" id="pilihantrian" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-xl"> <div class="modal-dialog modal-xl">
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="-close" data-dismiss="modal">&times;</button> <button type="button" class="-close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Daftar Antrian</h4> <h4 class="modal-title">Daftar Antrian</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row col-lg-12 antrian" id="seat"> <div class="row col-lg-12 antrian" id="seat">
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div class="container" > <div class="container" >
...@@ -288,4 +293,5 @@ input[type="done"] + label { ...@@ -288,4 +293,5 @@ input[type="done"] + label {
</div> </div>
</div> </div>
</div> </div>
</div>
...@@ -99,16 +99,16 @@ ...@@ -99,16 +99,16 @@
<span href="">Antrian</span> <span href="">Antrian</span>
</a> </a>
</li> </li>
<li class="nav-item"> <!-- <li class="nav-item">
<a class="nav-link collapsed" href="<?php echo $this->basePath('admin/tampilanumum') ?>"> <a class="nav-link collapsed" href="<?php echo $this->basePath('admin/tampilanumum') ?>">
<i class="fas fa-fw fa-folder"></i> <i class="fas fa-fw fa-folder"></i>
<span href="">Tampilan Umum</span> <span href="">Tampilan Umum</span>
</a> </a>
</li> </li> -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="<?php echo $this->basePath('admin/registrasidokter') ?>"> <a class="nav-link collapsed" href="<?php echo $this->basePath('admin/registrasidokter') ?>">
<i class="fas fa-fw fa-cog"></i> <i class="fas fa-fw fa-cog"></i>
<span href="">Registrasi Dokter</span> <span href="">Kelola Jadwal Dokter</span>
</a> </a>
</li> </li>
......
...@@ -20,11 +20,13 @@ ...@@ -20,11 +20,13 @@
->prependStylesheet($this->basePath('/tamplate/css/flaticon.css')) ->prependStylesheet($this->basePath('/tamplate/css/flaticon.css'))
->prependStylesheet($this->basePath('/tamplate/css/magnific-popup.css')) ->prependStylesheet($this->basePath('/tamplate/css/magnific-popup.css'))
->prependStylesheet($this->basePath('/tamplateadmin/css/swich-alert.css')) ->prependStylesheet($this->basePath('/tamplateadmin/css/swich-alert.css'))
->prependStylesheet($this->basePath('/tamplateadmin/assets/css/icons/icomoon/styles.css'))
->prependStylesheet($this->basePath('/tamplate/css/nice-select.css')) ->prependStylesheet($this->basePath('/tamplate/css/nice-select.css'))
->prependStylesheet($this->basePath('/tamplate/css/bootstrap.min.css')) ->prependStylesheet($this->basePath('/tamplate/css/bootstrap.min.css'))
->prependStylesheet($this->basePath('/tamplate/css/bootstrap.min.css')) ->prependStylesheet($this->basePath('/tamplate/css/bootstrap.min.css'))
->prependStylesheet($this->basePath('/tamplate/css/demo.css')) ->prependStylesheet($this->basePath('/tamplate/css/demo.css'))
->prependStylesheet($this->basePath('/tamplate/css/intlTelInput.css')) ->prependStylesheet($this->basePath('/tamplate/css/intlTelInput.css'))
?> ?>
</head> </head>
......
...@@ -65,20 +65,7 @@ $('#poli').on('change', function () { ...@@ -65,20 +65,7 @@ $('#poli').on('change', function () {
$("select#dokter").removeAttr('disabled'); $("select#dokter").removeAttr('disabled');
$("select#dokter").html(optionseg); $("select#dokter").html(optionseg);
} else { } else {
bootbox.dialog({ bootbox.alert({ message: 'Data Dokter Kosong', centerVertical: true });
message: "<span class='bigger-110'>" + result['info'] + "</span>",
buttons:
{
"OK":
{
"label": "<i class='icon-ok'></i> OK ",
"className": "btn-sm btn-danger",
"callback": function () {
notifyCancel('ERROR: ' + result['info'] + '. Bila ada kesulitan dimohon untuk menghubungi Admin terkait');
}
}
}
});
} }
} }
}); });
...@@ -104,20 +91,7 @@ function loadpoli() { ...@@ -104,20 +91,7 @@ function loadpoli() {
$("select#poli").html(optionseg); $("select#poli").html(optionseg);
} else { } else {
bootbox.dialog({ bootbox.alert({ message: 'Data Poli Kosong', centerVertical: true });
message: "<span class='bigger-110'>" + result['info'] + "</span>",
buttons:
{
"OK":
{
"label": "<i class='icon-ok'></i> OK ",
"className": "btn-sm btn-danger",
"callback": function () {
notifyCancel('ERROR: ' + result['info'] + '. Bila ada kesulitan dimohon untuk menghubungi Admin terkait');
}
}
}
});
} }
} }
}); });
...@@ -135,7 +109,7 @@ function loadantrian() { ...@@ -135,7 +109,7 @@ function loadantrian() {
}, },
success: function (result) { success: function (result) {
// console.log(result.data); console.log(result.data);
$('table.table-bordered > tbody').empty(); $('table.table-bordered > tbody').empty();
// console.log(result); // console.log(result);
...@@ -161,9 +135,10 @@ function loadantrian() { ...@@ -161,9 +135,10 @@ function loadantrian() {
$("#antrianadmin").append(newRow); $("#antrianadmin").append(newRow);
counter++; counter++;
// $('.loaddata').append('' + x + '<span>' + data[x].nama + '</span>'); // $('.loaddata').append('' + x + '<span>' + data[x].nama + '</span>');
} }
// console.log(data);
} else { } else {
bootbox.alert({ message: 'Data Antrian Kosong', centerVertical: true }); bootbox.alert({ message: 'Data Antrian Kosong', centerVertical: true });
} }
......
...@@ -38,53 +38,14 @@ function cekpasien(no_rekam_medis) { ...@@ -38,53 +38,14 @@ function cekpasien(no_rekam_medis) {
console.log(result); console.log(result);
if (result.code != 0) { if (result.code != 0) {
bootbox.alert({ message: "No rekam medis atau NIK tidak sesuai!", centerVertical: true }); bootbox.alert({ message: "No rekam medis tidak sesuai!", centerVertical: true });
} }
else if (result.code == 0) { else if (result.code == 0) {
console.log(result.data['datapasien'][0]['no_rekam_medis']); console.log(result.data['datapasien'][0]['no_rekam_medis']);
// alert('berhasil');
if (result.data['datapasien'][0]['no_rekam_medis'] == null) {
let $id = result.data['datapasien'][0]['id_pasien']; let $id = result.data['datapasien'][0]['id_pasien'];
let $encodedId = btoa($id); let $encodedId = btoa($id);
window.location.href = ("datapasien/" + $encodedId); window.location.href = ("datapasien/" + $encodedId);
}
if (result.data['datapasien'][0]['no_rekam_medis'] != null && (result.data['datapasien'][0]['status_code'] == 10)) {
let $idantrian = result.data['datapasien'][0]['id_antrian'];
let $encodedIdantrian = btoa($idantrian)
let no_rekam_medis = result.data['datapasien'][0]['no_rekam_medis'];
let nama = result.data['datapasien'][0]['nama'];
swal({
title: " Nama pasien '" + nama + "' sedang dalam antrian. \n Apakah anda ingin mencetak no antrian lagi ? ",
type: "error",
confirmButtonClass: "success",
confirmButtonText: "Yes!",
showCancelButton: true,
}, function () {
window.location = (baseURL + "/queue/cetakantrian/" + $encodedIdantrian);
});
} else if (result.data['datapasien'][0]['status_code'] == 20) {
bootbox.alert({ message: "Pasien Sedang Dalam Antrian", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 30) {
bootbox.alert({ message: "Pasien Sedang Dalam Panggilan Antrian", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 40) {
bootbox.alert({ message: "Pasien Sedang Diperika Dokter", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 50) {
bootbox.alert({ message: "Pasien Telah Selesai Diperiksa", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 60) {
bootbox.alert({ message: "Pasien Sedang Telah Terlewat Silahkan Hubungi Petugas", centerVertical: true });
}
// } else if (result.data['validasiinput'] == 1) {
// bootbox.alert({ message: "No Induk Kependudukan tidak sesuai", centerVertical: true });
} else {
// bootbox.alert({ message: "Pasien Tidak Terdaftar <br> Silahkan Daftar Terlebih Dahulu", centerVertical: true });
} }
}, },
...@@ -132,49 +93,4 @@ function validasidokter(no_rekam_medis, ktp) { ...@@ -132,49 +93,4 @@ function validasidokter(no_rekam_medis, ktp) {
} }
var inputQuantity = [];
$(function () {
$("#ktp").each(function (i) {
inputQuantity[i] = this.defaultValue;
$(this).data("idx", i); // save this field's index to access later
});
$("#ktp").on("keyup", function (e) {
var $field = $(this),
val = this.value,
$thisIndex = parseInt($field.data("idx"), 10); // retrieve the index
// window.console && console.log($field.is(":invalid"));
// $field.is(":invalid") is for Safari, it must be the last to not error in IE8
if (this.validity && this.validity.badInput || isNaN(val) || $field.is(":invalid")) {
this.value = inputQuantity[$thisIndex];
return;
}
if (val.length > Number($field.attr("maxlength"))) {
val = val.slice(0, 16);
$field.val(val);
}
inputQuantity[$thisIndex] = val;
});
})
var inputQuantity = [];
$(function () {
$("#no_rekam_medis").each(function (i) {
inputQuantity[i] = this.defaultValue;
$(this).data("idx", i); // save this field's index to access later
});
$("#no_rekam_medis").on("keyup", function (e) {
var $field = $(this),
val = this.value,
$thisIndex = parseInt($field.data("idx"), 10); // retrieve the index
// window.console && console.log($field.is(":invalid"));
// $field.is(":invalid") is for Safari, it must be the last to not error in IE8
if (this.validity && this.validity.badInput || isNaN(val) || $field.is(":invalid")) {
this.value = inputQuantity[$thisIndex];
return;
}
if (val.length > Number($field.attr("maxlength"))) {
val = val.slice(0, 8);
$field.val(val);
}
inputQuantity[$thisIndex] = val;
});
})
...@@ -45,8 +45,8 @@ function loadsisaantrian() { ...@@ -45,8 +45,8 @@ function loadsisaantrian() {
let no_antrian = $("input[name=antrian]:checked").val(); let no_antrian = $("input[name=antrian]:checked").val();
var sisa_antrian; var sisa_antrian;
console.log(dokter); // console.log(dokter);
console.log(no_antrian); // console.log(no_antrian);
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
...@@ -65,7 +65,7 @@ function loadsisaantrian() { ...@@ -65,7 +65,7 @@ function loadsisaantrian() {
let data = result.data; let data = result.data;
console.log(data[0].count); // console.log(data[0].count);
sisa_antrian = data[0].count; sisa_antrian = data[0].count;
// $('#sisa_antrian').val(data[0].count); // $('#sisa_antrian').val(data[0].count);
...@@ -121,7 +121,7 @@ function savedataaja() { ...@@ -121,7 +121,7 @@ function savedataaja() {
ipoli: poli, ipoli: poli,
idokter: dokter, idokter: dokter,
ino_antrian: no_antrian, ino_antrian: no_antrian,
isisa_antrian :sisa_antrian, isisa_antrian: sisa_antrian,
}, },
success: function (response) { success: function (response) {
...@@ -155,7 +155,7 @@ function savedataaja() { ...@@ -155,7 +155,7 @@ function savedataaja() {
loadpoli(); loadpoli();
$('#poli').on('change', function () { $('#poli').on('change', function () {
var idpoli = $('#poli').val(); var idpoli = $('#poli').val();
console.log(idpoli); // console.log(idpoli);
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
...@@ -176,20 +176,7 @@ $('#poli').on('change', function () { ...@@ -176,20 +176,7 @@ $('#poli').on('change', function () {
$("select#dokter").removeAttr('disabled'); $("select#dokter").removeAttr('disabled');
$("select#dokter").html(optionseg); $("select#dokter").html(optionseg);
} else { } else {
bootbox.dialog({ bootbox.alert({ message: 'Data Poli Kosong', centerVertical: true });
message: "<span class='bigger-110'>" + result['info'] + "</span>",
buttons:
{
"OK":
{
"label": "<i class='icon-ok'></i> OK ",
"className": "btn-sm btn-danger",
"callback": function () {
notifyCancel('ERROR: ' + result['info'] + '. Bila ada kesulitan dimohon untuk menghubungi Admin terkait');
}
}
}
});
} }
} }
}); });
...@@ -214,46 +201,100 @@ function loadpoli() { ...@@ -214,46 +201,100 @@ function loadpoli() {
$("select#poli").html(optionseg); $("select#poli").html(optionseg);
} else { } else {
bootbox.dialog({ bootbox.alert({ message: 'Data Poli Kosong', centerVertical: true });
message: "<span class='bigger-110'>" + result['info'] + "</span>",
buttons:
{
"OK":
{
"label": "<i class='icon-ok'></i> OK ",
"className": "btn-sm btn-danger",
"callback": function () {
notifyCancel('ERROR: ' + result['info'] + '. Bila ada kesulitan dimohon untuk menghubungi Admin terkait');
}
} }
} }
}); });
}
// validasipasien()
function validasipasien(id_poli, dokter, id_pasien) {
var exist = 0;
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/valpilihAntrian',
async: false,
data: {
id_pasien: id_pasien
},
success: function (result) {
// console.log(dokter)
var data = result.data;
for (x in data) {
if (id_pasien == data[x]['id_pasien']) {
if (id_poli == data[x]['id_poli']) {
if (dokter == data[x]['id_dokter']) {
let $idantrian = result.data[0]['id_antrian'];
let $encodedIdantrian = btoa($idantrian)
let nama = result.data[0]['nama'];
swal({
title: "Pasien dengan nama'" + nama + "' telah melakukan pendaftaran di poli dan dokter ini! \n Apakah anda ingin mencetak no antrian lagi ? ",
type: "warning",
confirmButtonClass: "success",
confirmButtonText: "Yes!",
showCancelButton: true,
}, function () {
window.location = (baseURL + "/queue/cetakantrian/" + $encodedIdantrian);
});
exist = 1;
}
}
} }
} }
},
error: function (xhr) {
//alert(xhr.status+'-'+xhr.statusText);
}
}); });
return exist;
} }
$('#pilihno').on('click', function () { $('#pilihno').on('click', function (e) {
pilihAntrian() e.preventDefault();
var id_pasien = $('#id_pasien').val();
var id_poli = $('#poli option:selected').attr("value");
var dokter = $('#dokter option:selected').attr("value");
pilihAntrian(id_poli)
// console.log(id_poli)
}); });
function pilihAntrian() {
var $dokter = $('#dokter option:selected').attr("value"); function pilihAntrian(id_poli) {
var dokter = $('#dokter option:selected').attr("value");
var id_pasien = $('#id_pasien').val();
// console.log(id_pasien);
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
url: baseURL + '/api/loadPilihAntrian', url: baseURL + '/api/loadPilihAntrian',
data: { data: {
iddok: $dokter, iddok: dokter,
id_poli: id_poli,
}, },
success: function (response) { success: function (response) {
// console.log(response.data);
var $antrian = (response.data); var $antrian = (response.data);
// console.log($antrian);
// console.log(response);
if (validasipasien(id_poli, dokter, id_pasien) == 1) {
// console.log(validasipasien(id_poli, dokter, id_pasien))
} else {
if ($antrian) { if ($antrian) {
var hour = 0; var hour = 0;
...@@ -269,8 +310,9 @@ function pilihAntrian() { ...@@ -269,8 +310,9 @@ function pilihAntrian() {
$('.antrian').empty(); $('.antrian').empty();
for (var i = 0; i < $antrian.length; i++) { for (var i = 0; i < $antrian.length; i++) {
var A = Date.now();
if ($antrian[i]['id_pasien'] === null) {//jika masih kosong if ($antrian[i]['id_pasien'] === null) {//jika masih kosong
let y = ''; let y = ' ';
var splittime = []; var splittime = [];
...@@ -282,8 +324,8 @@ function pilihAntrian() { ...@@ -282,8 +324,8 @@ function pilihAntrian() {
hour += Math.floor(minute / 60); hour += Math.floor(minute / 60);
minute = minute % 60; minute = minute % 60;
} }
if(hour >=24){ if (hour >= 24) {
hour=0; hour = 0;
} }
if (minute.toString().length === 1) { if (minute.toString().length === 1) {
...@@ -325,8 +367,8 @@ function pilihAntrian() { ...@@ -325,8 +367,8 @@ function pilihAntrian() {
} }
if(hour >=24){ if (hour >= 24) {
hour=0; hour = 0;
} }
if (minute.toString().length === 1) { if (minute.toString().length === 1) {
...@@ -376,8 +418,8 @@ function pilihAntrian() { ...@@ -376,8 +418,8 @@ function pilihAntrian() {
minute = minute % 60; minute = minute % 60;
} }
if(hour >=24){ if (hour >= 24) {
hour=0; hour = 0;
} }
let y = ''; let y = '';
...@@ -398,6 +440,11 @@ function pilihAntrian() { ...@@ -398,6 +440,11 @@ function pilihAntrian() {
} else { } else {
} }
}
}, },
error: function (xhr) { error: function (xhr) {
......
...@@ -72,6 +72,27 @@ function Loadpasien() { ...@@ -72,6 +72,27 @@ function Loadpasien() {
} }
function actionqueue(idpasien, iddokter) { function actionqueue(idpasien, iddokter) {
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/loadantrianmiss',
data: {
iidpasien: idpasien,
},
success: function (result) {
// console.log(result);
let nama = result.data[0].nama;
let no = result.data[0].no_antrian;
let poli = result.data[0].nama_poli;
let dokter = result.data[0].nama_dokter;
swal({
title: "Apakah yakin mengupdate data antrian dengan Nama '" + nama + "' di Poli '" + poli + "' dan Nama Dokter '" + dokter + "' ? ",
type: "warning",
confirmButtonClass: "btn-danger",
confirmButtonText: "Yes!",
showCancelButton: true,
},
function () {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
...@@ -101,6 +122,12 @@ function actionqueue(idpasien, iddokter) { ...@@ -101,6 +122,12 @@ function actionqueue(idpasien, iddokter) {
}); });
} }
} }
});
}
);
}
}); });
} }
...@@ -36,7 +36,7 @@ function Loadunregister() { ...@@ -36,7 +36,7 @@ function Loadunregister() {
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_poli + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_poli + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_dokter + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_dokter + '</td>';
cols += '<td class="tdCenterText bgtd1 "> <div class="text-center"> <span class="btn btn-primary btn-xs" onClick="unregister(' + data[x].id_pasien + ')">Reset</span></div> </td>'; cols += '<td class="tdCenterText bgtd1 "> <div class="text-center"> <span class="btn btn-danger btn-xs" onClick="unregister(' + data[x].id_pasien + ')">Reset</span></div> </td>';
// console.log(data[x].id_pasien); // console.log(data[x].id_pasien);
newRow.append(cols); newRow.append(cols);
...@@ -76,6 +76,27 @@ function Loadunregister() { ...@@ -76,6 +76,27 @@ function Loadunregister() {
} }
function unregister(id_pasien) { function unregister(id_pasien) {
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/loadantrianunregis',
data: {
id_pasien: id_pasien,
},
success: function (result) {
// console.log(result);
let nama = result.data[0].nama;
let no = result.data[0].no_antrian;
let poli = result.data[0].nama_poli;
let dokter = result.data[0].nama_dokter;
swal({
title: "Apakah yakin mereset data antrian dengan Nama '" + nama + "' di Poli '" + poli + "' dan Nama Dokter '" + dokter + "' dengan No Antrian '" + no + "' ?",
type: "warning",
confirmButtonClass: "btn-danger",
confirmButtonText: "Yes!",
showCancelButton: true,
},
function () {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
...@@ -89,7 +110,7 @@ function unregister(id_pasien) { ...@@ -89,7 +110,7 @@ function unregister(id_pasien) {
if (result.code == 0) { if (result.code == 0) {
swal({ swal({
title: "", title: "",
text: "Data Berhasil Diupdate!", text: "Data Berhasil Direset!",
icon: "succes", icon: "succes",
button: "ok", button: "ok",
}, function () { }, function () {
...@@ -99,12 +120,17 @@ function unregister(id_pasien) { ...@@ -99,12 +120,17 @@ function unregister(id_pasien) {
} else { } else {
swal({ swal({
title: "", title: "",
text: "Data Gagal Diupdate!", text: "Data Gagal Direset!",
icon: "succes", icon: "succes",
button: "ok", button: "ok",
}); });
} }
} }
});
}
);
}
}); });
} }
...@@ -24,20 +24,7 @@ function loadpoli() { ...@@ -24,20 +24,7 @@ function loadpoli() {
$("select#poli").html(optionseg); $("select#poli").html(optionseg);
} else { } else {
bootbox.dialog({ bootbox.alert({ message: 'Data Poli Kosong', centerVertical: true });
message: "<span class='bigger-110'>" + result['info'] + "</span>",
buttons:
{
"OK":
{
"label": "<i class='icon-ok'></i> OK ",
"className": "btn-sm btn-danger",
"callback": function () {
notifyCancel('ERROR: ' + result['info'] + '. Bila ada kesulitan dimohon untuk menghubungi Admin terkait');
}
}
}
});
} }
} }
}); });
...@@ -75,9 +62,10 @@ function Loaddokter() { ...@@ -75,9 +62,10 @@ function Loaddokter() {
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_poli + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_poli + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_dokter + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_dokter + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].kode_dokter + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].kode_dokter + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].condition + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].image_dokter + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].image_dokter + '</td>';
cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#Editdata" onClick="loadedit(' + data[x].id_dokter + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_dokter + ')">Delete</span></div></td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].condition + '</td>';
cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#Editdata" onClick="loadedit(' + data[x].id_dokter + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_dokter + ')">Hapus</span> <span style="padding: 7px;margin-top:10px; font-size: 14px;"class="btn btn-info btn-xs" onclick="Update(' + data[x].id_dokter + "," + data[x].id_condition + ')">Update Kondisi</span></div></td>';
newRow.append(cols); newRow.append(cols);
$("#tabledokter").append(newRow); $("#tabledokter").append(newRow);
...@@ -98,11 +86,12 @@ function Loaddokter() { ...@@ -98,11 +86,12 @@ function Loaddokter() {
paging: true, paging: true,
columnDefs: [ columnDefs: [
{ width: 30, targets: 0 }, { width: 30, targets: 0 },
{ width: 155, targets: 1 }, { width: 120, targets: 1 },
{ width: 155, targets: 2 }, { width: 120, targets: 2 },
{ width: 155, targets: 3 }, { width: 120, targets: 3 },
{ width: 155, targets: 4 }, { width: 120, targets: 4 },
{ width: 90, targets: 5 }, { width: 90, targets: 5 },
{ width: 90, targets: 6 },
], ],
}); });
...@@ -211,8 +200,8 @@ function validasigambar() { ...@@ -211,8 +200,8 @@ function validasigambar() {
$('#tambahmodal').on('click', function () { $('#tambahmodal').on('click', function () {
loadpoli() loadpoli()
}) })
$('#tambah').on('click', function () { $('#tambah').on('click', function () {
let nama_dokter = $('#nama_dokter').val(); let nama_dokter = $('#nama_dokter').val();
let kode_dokter = $('#kode_dokter').val(); let kode_dokter = $('#kode_dokter').val();
...@@ -249,7 +238,7 @@ $('#tambah').on('click', function () { ...@@ -249,7 +238,7 @@ $('#tambah').on('click', function () {
} }
else if (validasigambar() == 1) { else if (validasigambar() == 1) {
bootbox.alert({ message: 'Harus berupa gambar', centerVertical: true }); bootbox.alert({ message: 'File Harus berupa gambar', centerVertical: true });
} else { } else {
savedokter() savedokter()
} }
...@@ -325,7 +314,7 @@ $('#edit').on('click', function () { ...@@ -325,7 +314,7 @@ $('#edit').on('click', function () {
let nama_dokter = $('#nama_dokteredt').val(); let nama_dokter = $('#nama_dokteredt').val();
let kode_dokter = $('#kode_dokteredt').val(); let kode_dokter = $('#kode_dokteredt').val();
let poli = $("#poliedt option:selected").attr("value"); let poli = $("#poliedt option:selected").attr("value");
const fileupload = $('#gambar_dokter').prop('files')[0]; const fileupload = $('#gambar_dokteredt').prop('files')[0];
if (nama_dokter == null || nama_dokter == "") { if (nama_dokter == null || nama_dokter == "") {
...@@ -340,19 +329,20 @@ $('#edit').on('click', function () { ...@@ -340,19 +329,20 @@ $('#edit').on('click', function () {
bootbox.alert({ message: 'Poli tidak boleh kosong', centerVertical: true }); bootbox.alert({ message: 'Poli tidak boleh kosong', centerVertical: true });
return false; return false;
} }
else if (fileupload == null) {
bootbox.alert({ message: 'Gambar dokter tidak boleh kosong', centerVertical: true }); else if (validasidokter(poli, nama_dokter, kode_dokter) == 4) {
return false;
}
else if (validasidokter(poli, nama_dokter, kode_dokter) == 3) {
bootbox.alert({ message: 'Nama dokter harus berbeda!', centerVertical: true }); bootbox.alert({ message: 'Nama dokter harus berbeda!', centerVertical: true });
} }
else if (validasidokter(poli, nama_dokter, kode_dokter) == 4) { else if (validasidokter(poli, nama_dokter, kode_dokter) == 5) {
bootbox.alert({ message: 'Kode dokter harus berbeda!', centerVertical: true }); bootbox.alert({ message: 'Kode dokter harus berbeda!', centerVertical: true });
} else if (validasigambar() == 2) {
if (fileupload == null || fileupload == '') {
editdatadokter(id_dokter);
} else {
bootbox.alert({ message: 'File Harus berupa gambar', centerVertical: true });
} }
else if (validasigambar() == 2) {
bootbox.alert({ message: 'Harus berupa gambar', centerVertical: true });
} else { } else {
editdatadokter(id_dokter) editdatadokter(id_dokter)
} }
...@@ -362,7 +352,7 @@ $('#edit').on('click', function () { ...@@ -362,7 +352,7 @@ $('#edit').on('click', function () {
}) })
function editdatadokter(id_dokter) { function editdatadokter(id_dokter) {
let poli = $("#poliedt option:selected").attr("value"); let poli = $("#poliedt option:selected").attr("value");
let condition = $("#condition option:selected").attr("value");
let nama_dokter = $('#nama_dokteredt').val(); let nama_dokter = $('#nama_dokteredt').val();
let kode_dokter = $('#kode_dokteredt').val(); let kode_dokter = $('#kode_dokteredt').val();
const fileupload = $('#gambar_dokteredt').prop('files')[0]; const fileupload = $('#gambar_dokteredt').prop('files')[0];
...@@ -373,7 +363,7 @@ function editdatadokter(id_dokter) { ...@@ -373,7 +363,7 @@ function editdatadokter(id_dokter) {
formData.append('inama_dokter', nama_dokter); formData.append('inama_dokter', nama_dokter);
formData.append('ikode_dokter', kode_dokter); formData.append('ikode_dokter', kode_dokter);
formData.append('ipoli', poli); formData.append('ipoli', poli);
formData.append('icondition', condition);
formData.append('fileupload', fileupload); // set file ke tipe data binary formData.append('fileupload', fileupload); // set file ke tipe data binary
...@@ -468,14 +458,6 @@ function loadedit(id_dokter) { ...@@ -468,14 +458,6 @@ function loadedit(id_dokter) {
$("select#poliedt").val(data[0].id_poli).change(); $("select#poliedt").val(data[0].id_poli).change();
}); });
for (var i = 0; i < res.condition.length; i++) {//Condition
optionsegc += '<option value="' + res.condition[i].id_condition + '">' + res.condition[i].condition + '</option>';
}
$("select#condition").html(optionsegc);
$(document).ready(function () {
$("select#condition").val(data[0].id_condition).change();
});
...@@ -561,3 +543,35 @@ function Delete(param) { ...@@ -561,3 +543,35 @@ function Delete(param) {
}); });
} }
function Update(id_dokter, id_condition) {
// console.log(id_dokter)
// console.log(id_condition)
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/updateconditiondok',
data: {
id_dokter: id_dokter,
id_condition: id_condition,
},
success: function (result) {
console.log(result);
// console.log(result)
if (result.code == 0) {
location.reload();
} else {
bootbox.alert({ message: 'Gagal ', centerVertical: true });
}
},
error: function () {
bootbox.alert({ message: 'Data dokter masih terdaftar dalam poli ', centerVertical: true });
}
});
}
\ No newline at end of file
...@@ -34,7 +34,7 @@ function Loadpasien() { ...@@ -34,7 +34,7 @@ function Loadpasien() {
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].alamat + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].alamat + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].no_hp + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].no_hp + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].create_date + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].create_date + '</td>';
cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#Editdata" onClick="loadedit(' + data[x].id_pasien + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_pasien + ')">Delete</span></div></td>'; cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#Editdata" onClick="loadedit(' + data[x].id_pasien + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_pasien + ')">Hapus</span></div></td>';
// console.log(data[x].id_pasien); // console.log(data[x].id_pasien);
newRow.append(cols); newRow.append(cols);
......
...@@ -27,7 +27,6 @@ function Loadpoli() { ...@@ -27,7 +27,6 @@ function Loadpoli() {
let data = result.data; let data = result.data;
let counter = 1; let counter = 1;
for (x in data) { for (x in data) {
// console.log(data); // console.log(data);
// var newRow = $("<tr>"); // var newRow = $("<tr>");
...@@ -39,7 +38,7 @@ function Loadpoli() { ...@@ -39,7 +38,7 @@ function Loadpoli() {
cols += '<td class="tdCenterText bgtd1 ">' + data[x].kode_poli + '</td>'; cols += '<td class="tdCenterText bgtd1 ">' + data[x].kode_poli + '</td>';
cols += '<td class="tdCenterText bgtd1 ">' + data[x].deskripsi_poli + '</td>'; cols += '<td class="tdCenterText bgtd1 ">' + data[x].deskripsi_poli + '</td>';
cols += '<td class="tdCenterText bgtd1 ">' + data[x].image_poli + '</td>'; cols += '<td class="tdCenterText bgtd1 ">' + data[x].image_poli + '</td>';
cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#editData" onClick="loadedit(' + data[x].id_poli + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_poli + ')">Delete</span></div></td>'; cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#editData" onClick="loadedit(' + data[x].id_poli + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_poli + ')">Hapus</span></div></td>';
cols += '</tr>' cols += '</tr>'
//newRow.append(cols); //newRow.append(cols);
$("#tablepoli").append(cols); $("#tablepoli").append(cols);
...@@ -114,7 +113,7 @@ $('#tambah').on('click', function (e) { ...@@ -114,7 +113,7 @@ $('#tambah').on('click', function (e) {
bootbox.alert({ message: 'Gambar Poli sudah ada!', centerVertical: true }); bootbox.alert({ message: 'Gambar Poli sudah ada!', centerVertical: true });
} }
else if (validasigambar() == 1) { else if (validasigambar() == 1) {
bootbox.alert({ message: 'Harus berupa gambar', centerVertical: true }); bootbox.alert({ message: 'File Harus berupa gambar', centerVertical: true });
} else { } else {
savedatapoli(); savedatapoli();
} }
...@@ -217,7 +216,10 @@ function validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload) { ...@@ -217,7 +216,10 @@ function validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload) {
var data = result.data; var data = result.data;
console.log(data) console.log(data)
var counter = 0; var counternama = 0;
var counterkode = 0;
var counterdesk = 0;
var counterimage = 0;
for (x in data) { for (x in data) {
...@@ -235,27 +237,27 @@ function validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload) { ...@@ -235,27 +237,27 @@ function validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload) {
exist = 4; exist = 4;
} }
if (nama_poli == data[x]['nama_poli']) { if (nama_poli == data[x]['nama_poli']) {
counter += 1; counternama += 1;
if (counter > 1) { if (counternama > 1) {
exist = 5; exist = 5;
} }
} }
if (kode_poli == data[x]['kode_poli']) { if (kode_poli == data[x]['kode_poli']) {
counter += 1; counterkode += 1;
if (counter > 1) { if (counterkode > 1) {
exist = 6; exist = 6;
} }
} }
if (deskripsi_poli == data[x]['deskripsi_poli']) { if (deskripsi_poli == data[x]['deskripsi_poli']) {
counter += 1; counterdesk += 1;
if (counter > 1) { if (counterdesk > 1) {
exist = 7; exist = 7;
} }
} }
if (fileupload == data[x]['image_poli']) { if (fileupload == data[x]['image_poli']) {
counter += 1; counterimage += 1;
if (counter > 1) { if (counterimage > 1) {
exist = 8; exist = 8;
} }
} }
...@@ -281,6 +283,7 @@ $('#edit').on('click', function () { ...@@ -281,6 +283,7 @@ $('#edit').on('click', function () {
let kode_poli = $('#kode_poliEdt').val(); let kode_poli = $('#kode_poliEdt').val();
let deskripsi_poli = $('#deskripsi_poliEdt').val(); let deskripsi_poli = $('#deskripsi_poliEdt').val();
const fileupload = $('#gambar_poliedt').prop('files')[0]; const fileupload = $('#gambar_poliedt').prop('files')[0];
console.log(fileupload);
if (nama_poli == null || nama_poli == "") { if (nama_poli == null || nama_poli == "") {
bootbox.alert({ message: 'Nama poli tidak boleh kosong', centerVertical: true }); bootbox.alert({ message: 'Nama poli tidak boleh kosong', centerVertical: true });
...@@ -294,10 +297,7 @@ $('#edit').on('click', function () { ...@@ -294,10 +297,7 @@ $('#edit').on('click', function () {
bootbox.alert({ message: 'Deskripsi poli tidak boleh kosong', centerVertical: true }); bootbox.alert({ message: 'Deskripsi poli tidak boleh kosong', centerVertical: true });
return false; return false;
} }
else if (fileupload == null) {
bootbox.alert({ message: ' Gambar tidak boleh kosong', centerVertical: true });
return false;
}
else if (kode_poli.toString().length > 5) { else if (kode_poli.toString().length > 5) {
bootbox.alert({ message: 'Kode Poli tidak boleh lebih dari 5 angka', centerVertical: true }); bootbox.alert({ message: 'Kode Poli tidak boleh lebih dari 5 angka', centerVertical: true });
return false; return false;
...@@ -311,11 +311,15 @@ $('#edit').on('click', function () { ...@@ -311,11 +311,15 @@ $('#edit').on('click', function () {
else if (validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload) == 7) { else if (validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload) == 7) {
bootbox.alert({ message: 'Deskripsi Poli harus berbeda!', centerVertical: true }); bootbox.alert({ message: 'Deskripsi Poli harus berbeda!', centerVertical: true });
} }
else if (validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload.name) == 8) { else if (validasipoli(nama_poli, kode_poli, deskripsi_poli, fileupload) == 8) {
bootbox.alert({ message: 'Gambar Poli harus berbeda!', centerVertical: true }); bootbox.alert({ message: 'Gambar Poli harus berbeda!', centerVertical: true });
} }
else if (validasigambar() == 2) { else if (validasigambar() == 2) {
bootbox.alert({ message: 'Harus berupa gambar', centerVertical: true }); if (fileupload == null || fileupload == '') {
editdatapoli(id_poli)
} else {
bootbox.alert({ message: 'File Harus berupa gambar', centerVertical: true });
}
} else { } else {
editdatapoli(id_poli) editdatapoli(id_poli)
...@@ -466,15 +470,8 @@ function Delete(param) { ...@@ -466,15 +470,8 @@ function Delete(param) {
button: "ok", button: "ok",
}); });
} }
},
error: function (xhr) {
alert(xhr.status + '-' + xhr.statusText);
} }
}); });
},
function () {
// This function will run if the user clicked "cancel"
window.location.href = "<?php echo Yii::$app->request->baseUrl;?>/todo/index/";
} }
); );
......
...@@ -82,7 +82,7 @@ function Loadruang() { ...@@ -82,7 +82,7 @@ function Loadruang() {
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].condition + '</td>'; cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].condition + '</td>';
cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#Editdata" onClick="loadedit(' + data[x].id_ruang + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_ruang + ')">Delete</span></div></td>'; cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" ><span style="padding: 7px;" class="btn btn-success btn-xs" data-toggle="modal" data-target="#Editdata" onClick="loadedit(' + data[x].id_ruang + ')">Edit</span> <span style="padding: 7px;"class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_ruang + ')">Hapus</span><span style="padding: 7px;margin-top:10px; font-size: 14px;"class="btn btn-info btn-xs" onclick="Update(' + data[x].id_ruang + "," + data[x].id_condition + ')">Update Kondisi</span></div></td>';
newRow.append(cols); newRow.append(cols);
$("#tableruang").append(newRow); $("#tableruang").append(newRow);
...@@ -288,7 +288,7 @@ function editdataruang(id_ruang) { ...@@ -288,7 +288,7 @@ function editdataruang(id_ruang) {
let poli = $("#poliedt option:selected").attr("value"); let poli = $("#poliedt option:selected").attr("value");
let nama_ruang = $('#nama_ruangedt').val(); let nama_ruang = $('#nama_ruangedt').val();
let lantai = $('#lantaiedt').val(); let lantai = $('#lantaiedt').val();
let condition = $("#condition option:selected").attr("value");
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
...@@ -299,7 +299,6 @@ function editdataruang(id_ruang) { ...@@ -299,7 +299,6 @@ function editdataruang(id_ruang) {
inama_ruang: nama_ruang, inama_ruang: nama_ruang,
ipoli: poli, ipoli: poli,
ilantai: lantai, ilantai: lantai,
icondition: condition,
}, },
...@@ -389,15 +388,6 @@ function loadedit(id_ruang) { ...@@ -389,15 +388,6 @@ function loadedit(id_ruang) {
$("select#poliedt").val(data[0].id_poli).change(); $("select#poliedt").val(data[0].id_poli).change();
}); });
for (var i = 0; i < res.condition.length; i++) {//Condition
optionsegc += '<option value="' + res.condition[i].id_condition + '">' + res.condition[i].condition + '</option>';
}
$("select#condition").html(optionsegc);
$(document).ready(function () {
$("select#condition").val(data[0].id_condition).change();
});
} }
...@@ -431,8 +421,9 @@ function Delete(param) { ...@@ -431,8 +421,9 @@ function Delete(param) {
success: function (result) { success: function (result) {
// console.log(result); // console.log(result);
let nama_ruang = result.data[0].nama_ruang; let nama_ruang = result.data[0].nama_ruang;
let lantai = result.data[0].lantai;
swal({ swal({
title: "Apakah yakin mengahapus ruang '" + nama_ruang + "'? ", title: "Apakah yakin mengahapus ruang '" + nama_ruang + " ' lantai '" + lantai + "'? ",
type: "error", type: "error",
confirmButtonClass: "btn-danger", confirmButtonClass: "btn-danger",
confirmButtonText: "Yes!", confirmButtonText: "Yes!",
...@@ -479,3 +470,35 @@ function Delete(param) { ...@@ -479,3 +470,35 @@ function Delete(param) {
}); });
} }
function Update(id_ruang, id_condition) {
// console.log(id_dokter)
// console.log(id_condition)
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/updateconditionruang',
data: {
id_ruang: id_ruang,
id_condition: id_condition,
},
success: function (result) {
console.log(result);
// console.log(result)
if (result.code == 0) {
location.reload();
} else {
bootbox.alert({ message: 'Gagal ', centerVertical: true });
}
},
error: function () {
bootbox.alert({ message: 'Data dokter masih terdaftar dalam poli ', centerVertical: true });
}
});
}
\ No newline at end of file
function antrianadmin() {
window.location.href = "antrianadmin";
}
LoadDadta();
function LoadDadta() {
/* save data */
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/loadantrianregisterall',
success: function (result) {
// console.log(result);
$('table.table-bordered > tbody').empty();
// console.log(result);
if (result.code == 0) {
let data = result.data;
let counter = 1;
for (x in data) {
// console.log(data);
var newRow = $("<tr>");
var cols = "";
// console.log(data[x].id_register);
cols += '<tr>'
cols += '<td class="">' + counter + '</td>';
// cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].id_register + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_poli + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_dokter + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].nama_ruang + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].antrian_all + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].jam_mulai + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].waktu_antrian + '</td>';
cols += '<td class="tdCenterText bgtd1 tdBorder-left">' + data[x].create_date + '</td>';
cols += '<td class="tdCenterText bgtd1 "> <div class="text-center" > <span style="padding: 7px;" class="btn btn-danger btn-xs" onclick="Delete(' + data[x].id_register + ')">Hapus</span></div></td>';
cols += '</tr>'
newRow.append(cols);
$("#tableregisterdokter").append(cols);
counter++;
}
} else {
}
$('#dataTable').DataTable({
"scrollY": '600px',
"scrollX": true,
fixedHeader: true,
scrollCollapse: true,
paging: true,
columnDefs: [
{ width: 20, targets: 0 },
{ width: 100, targets: 1 },
{ width: 100, targets: 2 },
{ width: 50, targets: 3 },
{ width: 50, targets: 4 },
{ width: 50, targets: 5 },
{ width: 50, targets: 6 },
{ width: 50, targets: 7 },
{ width: 100, targets: 8 },
],
});
},
error: function (xhr) {
alert(xhr.status + '-' + xhr.statusText);
}
});
}
function Delete(param) {
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/loadantrianregisterall',
data: {
id: param,
},
success: function (result) {
// console.log(result.data[0].nama_poli);
let id_register = result.data[0].id_register;
let nama_poli = result.data[0].nama_poli;
let nama_dokter = result.data[0].nama_dokter;
let nama_ruang = result.data[0].nama_ruang;
swal({
title: "Apakah yakin mengahapus Registrasi Dokter dengan Nama Poli '" + nama_poli + "', Nama Dokter '" + nama_dokter + "' dan Nama Ruangan '" + nama_ruang + "' ini ? ",
type: "error",
confirmButtonClass: "btn-danger",
confirmButtonText: "Yes!",
showCancelButton: true,
},
function () {
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + '/api/deletedataregister',
data: {
id: param,
},
success: function (result) {
// console.log(result)
if (result.code == 0) {
swal({
title: "",
text: "Data Berhasil Dihapus!",
icon: "succes",
button: "ok",
}, function () {
location.reload();
});
} else {
bootbox.alert({ message: 'Data Kosong', centerVertical: true });
}
},
error: function (xhr) {
alert(xhr.status + '-' + xhr.statusText);
}
});
},
function () {
// This function will run if the user clicked "cancel"
window.location.href = "<?php echo Yii::$app->request->baseUrl;?>/todo/index/";
}
);
}
});
}
...@@ -260,7 +260,6 @@ function SaveDataRegister(param) { ...@@ -260,7 +260,6 @@ function SaveDataRegister(param) {
let antrian_all = $('#antrian_all').val(); let antrian_all = $('#antrian_all').val();
let waktu_antrian = $('#waktu_antrian').val(); let waktu_antrian = $('#waktu_antrian').val();
let jam_mulai = $('#jam_mulai').val(); let jam_mulai = $('#jam_mulai').val();
let tanggal_buka = $('#tanggal_buka').val();
if (ruang == null || ruang == "") { if (ruang == null || ruang == "") {
...@@ -353,7 +352,7 @@ function SaveDataRegister(param) { ...@@ -353,7 +352,7 @@ function SaveDataRegister(param) {
if (result.code == 0) { if (result.code == 0) {
$('#addData').modal('hide'); $('#addData').modal('hide');
swal({ swal({
title: "<span style='color:#222'>Berhasil ditambahkan!</span>", title: "<span style='color:#222'>Berhasil!</span>",
confirmButtonColor: "#66BB6A", confirmButtonColor: "#66BB6A",
html: true, html: true,
type: "success" type: "success"
...@@ -546,7 +545,7 @@ function loadedit(id_register) { ...@@ -546,7 +545,7 @@ function loadedit(id_register) {
} else { } else {
bootbox.alert({ message: 'Data Kosong', centerVertical: true }); // bootbox.alert({ message: 'Data Kosong', centerVertical: true });
} }
}, },
......
loadantrian(id_poli);
function loadantrian(param) {
$.ajax({
type: 'POST',
dataType: 'json',
url: baseURL + `/api/loadantrian`,
data: {
id_poli: param,
},
success: function (result) {
console.log(result);
// $('.loaddata').empty();
// console.log(result);
if (result['code'] == 0) {
var res = result['data'];
$("#listdata").empty();
$('#no_antrian').empty();
let hasil = '';
for (var i = 0; i < res.length; i++) {
$('#no_antrian').empty();
$('#no_antrian').append("-");
if (res[i]['status_code'] == 30) {
valTemp = res[i]['kode_dokter'] + res[i]['no_antrian'];
$('#no_antrian').empty();
$('#no_antrian').append(valTemp);
ruang = res[i]['nama_ruang'];
$('#ruang').empty();
$('#ruang').append(ruang);
} else {
$('#no_antrian').append("-");
}
hasil =
`
<div class="card col-sm-2" style="border-color: #e94c72;background: #faebd73b; width: 20rem;">
<div class="alert alert-info alert-styled-left alert-arrow-left alert-component" style="background: #faebd73b;">
<div><input type="hidden" value="nomer antrian" id="text-to-speech" placeholder="Enter text to speak..."/></div>
<h1 class="error-title" style=" font-weight:;font-size:53px;font-family: Times New Roman, Times, serif;color: #fff"><span > `+ res[i]['kode_dokter'] + `-` + res[i]['no_antrian'] + ` </span></h1>
</div>
<div><input type="hidden" value="no_antrian" id="no_antrian" /></div>
<div><input type="hidden" value="nama_ruang" id="nama_ruang" /><span style="visibility:hidden" id="nama_ruang"></span></div>
</div>
`
$("#listdata").append(hasil);
}
} else {
$('#no_antrian').empty();
$('#no_antrian').append("-");
}
},
error: function (xhr) {
alert(xhr.status + '-' + xhr.statusText);
}
});
}
if (result.code != 0) {
bootbox.alert({ message: "No rekam medis atau NIK tidak sesuai!", centerVertical: true });
}
else if (result.code == 0) {
console.log(result.data['datapasien'][0]['no_rekam_medis']);
// alert('berhasil');
if (result.data['datapasien'][0]['no_rekam_medis'] == null) {
let $id = result.data['datapasien'][0]['id_pasien'];
let $encodedId = btoa($id);
window.location.href = ("datapasien/" + $encodedId);
}
if (result.data['datapasien'][0]['no_rekam_medis'] != null && (result.data['datapasien'][0]['status_code'] == 10)) {
let $idantrian = result.data['datapasien'][0]['id_antrian'];
let $encodedIdantrian = btoa($idantrian)
let no_rekam_medis = result.data['datapasien'][0]['no_rekam_medis'];
let nama = result.data['datapasien'][0]['nama'];
swal({
title: " Nama pasien '" + nama + "' sedang dalam antrian. \n Apakah anda ingin mencetak no antrian lagi ? ",
type: "error",
confirmButtonClass: "success",
confirmButtonText: "Yes!",
showCancelButton: true,
}, function () {
window.location = (baseURL + "/queue/cetakantrian/" + $encodedIdantrian);
});
} else if (result.data['datapasien'][0]['status_code'] == 20) {
bootbox.alert({ message: "Pasien Sedang Dalam Antrian", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 30) {
bootbox.alert({ message: "Pasien Sedang Dalam Panggilan Antrian", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 40) {
bootbox.alert({ message: "Pasien Sedang Diperika Dokter", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 50) {
bootbox.alert({ message: "Pasien Telah Selesai Diperiksa", centerVertical: true });
} else if (result.data['datapasien'][0]['status_code'] == 60) {
bootbox.alert({ message: "Pasien Sedang Telah Terlewat Silahkan Hubungi Petugas", centerVertical: true });
}
// } else if (result.data['validasiinput'] == 1) {
// bootbox.alert({ message: "No Induk Kependudukan tidak sesuai", centerVertical: true });
} else {
// bootbox.alert({ message: "Pasien Tidak Terdaftar <br> Silahkan Daftar Terlebih Dahulu", centerVertical: true });
}
\ No newline at end of file
...@@ -10,7 +10,7 @@ function loadpoli() { ...@@ -10,7 +10,7 @@ function loadpoli() {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
url: baseURL + '/api/loadRegisterPoli', url: baseURL + '/api/loadPoli',
success: function (result) { success: function (result) {
...@@ -29,17 +29,17 @@ function loadpoli() { ...@@ -29,17 +29,17 @@ function loadpoli() {
$("#poli").append(y); $("#poli").append(y);
} else { } else {
alert(result.info); // alert(result.info);
} }
}, },
error: function (xhr) { // error: function (xhr) {
alert(xhr.status + '-' + xhr.statusText); // alert(xhr.status + '-' + xhr.statusText);
} // }
}); });
} }
$(document).ready(function () { $(document).ready(function () {
loadChart(9) loadChart(12)
}); });
function loadChart(id) { function loadChart(id) {
...@@ -120,7 +120,7 @@ function loadChart(id) { ...@@ -120,7 +120,7 @@ function loadChart(id) {
}); });
bootbox.alert({ message: 'Data Kosong', centerVertical: true }); // bootbox.alert({ message: 'Data Kosong', centerVertical: true });
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment