sql 在MSS中湮灭然后重建一个单元(HFM_SECT)。
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 在MSS中湮灭然后重建一个单元(HFM_SECT)。相关的知识,希望对你有一定的参考价值。
/*
FILE:Delete and then Rebuild HFM_SECT.sql
AUTH: James R. Aylesworth
DATE: Sep 2, 2015
*****************************************************
Use with CAUTION:
This file will completely obliterate the old unit
from MSS!
This file will NOT remove any of employee profiles,
BUT it will remove any pertanent scheduling info!
It will then re-insert the new settings for the unit.
*****************************************************
*/
SET DEFINE ON;
DEFINE UNIT_NAME = 'HFM_SECT';
/*DELETE ALL OUT UNIT DATA*/
DELETE FROM employee_times WHERE unit_id = '&UNIT_NAME';
DELETE FROM finalized WHERE unit_id = '&UNIT_NAME';
DELETE FROM groups WHERE unit_id = '&UNIT_NAME';
DELETE FROM ot_req WHERE unit_id = '&UNIT_NAME';
DELETE FROM slots WHERE unit_id = '&UNIT_NAME';
DELETE FROM slot_limits WHERE unit_id = '&UNIT_NAME';
DELETE FROM sub_group WHERE unit_id = '&UNIT_NAME';
DELETE FROM time_block_spec WHERE unit_id = '&UNIT_NAME';
DELETE FROM unit_events WHERE unit_id = '&UNIT_NAME';
DELETE FROM unit_spec WHERE unit_id = '&UNIT_NAME';
DELETE FROM unit_np_time WHERE unit_id = '&UNIT_NAME';
DELETE FROM UNIT_TIMES WHERE UNIT_ID = '&UNIT_NAME';
/*REMOVE ALL OLD PROFILE SCHEDULE DATA*/
UPDATE
( SELECT * FROM EMPLOYEE_PROFILE WHERE UNIT_ID = '&UNIT_NAME'
)
SET CONFLICTS = NULL,
REDSHIFTS = NULL,
WEEKEND_HRS = NULL,
WEEKEND_CONTRACT = NULL,
MINIMUM_NIGHT_SHIFT = NULL,
MINIMUM_EVENING_SHIFT = NULL,
GROUP_CHOICE_ID = 'GA',
SG_CHOICE_ID = '1',
SCHOOL = NULL,
PR_UNITS = NULL;
/*UPDATE EMPLS ALIAS*/
UPDATE employee_profile
SET ms_alias = (
CASE
WHEN (title LIKE 'Manager%')
THEN SUBSTR(first_name,1,1)
|| SUBSTR(last_name,1,4)
|| '_MGR'
WHEN (title LIKE 'Medical Assistant%')
THEN SUBSTR(first_name,1,1)
|| SUBSTR(LAST_NAME,1,5)
|| '_MA'
WHEN (title LIKE 'Sec 3%')
THEN SUBSTR(first_name,1,1)
|| SUBSTR(last_name,1,4)
|| '_SEC'
WHEN (title LIKE 'Supervisor%')
THEN SUBSTR(first_name,1,1)
|| SUBSTR(last_name,1,4)
|| '_SUP'
WHEN (ms_alias IS NULL)
THEN SUBSTR(first_name,1,1)
|| SUBSTR(last_name,1,8)
ELSE ms_alias
END )
WHERE UNIT_ID='&UNIT_NAME'
AND DEPT ='891';
/*PUT HEIDI AND MINDY IN ADMIN GROUP*/
UPDATE
(SELECT *
FROM EMPLOYEE_PROFILE
WHERE EMPLOYEE_ID IN ('15107','6657')
AND UNIT_ID = '&UNIT_NAME'
)
SET GROUP_CHOICE_ID = 'GB';
/*INSERT THE NEW UNIT_SPEC*/
REM INSERTING into UNIT_SPEC
INSERT
INTO UNIT_SPEC
(
UNIT_ID,
UNIT_NAME,
FACILITY_ID,
DAY_START_TIME,
SLOTS_PER_DAY,
HOURS_PER_SLOT,
STRT_SLT_WKND,
END_SLT_WKND,
MSTR_STRT_DT,
DEPT,
MSS_UNIT_ID,
CALL,
ACTIVE,
SERVICE_ID
)
VALUES
(
'&UNIT_NAME',
'Highland Family Med. Sect.',
'HH',
23,10,
2.4,
NULL,
NULL,
TO_DATE('21-DEC-08 00:00:00','DD-MON-RR HH24:MI:SS'),
891,
NULL,
2,
'Y',
0
);
/*INSERT THE NEW GROUPS*/
REM INSERTING into GROUPS
INSERT
INTO GROUPS
(
GROUP_NAME,
UNIT_ID,
CALC_WITH,
SORT_ORDER,
GROUP_ID,
GRP_PR_TIME_CODES,
GRP_NP_TIME_CODES,
STOP_DATE
)
VALUES
(
'SECT',
'&UNIT_NAME',
NULL,
1,
'GA',
'11D10,130D7.5,2D4,5E4.5,730D,7D,815D,830D,830D4,8D,8D4,9D12',
'CONFLICT,RED,SCHOOL',
NULL
);
INSERT
INTO GROUPS
(
GROUP_NAME,
UNIT_ID,
CALC_WITH,
SORT_ORDER,
GROUP_ID,
GRP_PR_TIME_CODES,
GRP_NP_TIME_CODES,
STOP_DATE
)
VALUES
(
'ADMIN',
'&UNIT_NAME',
NULL,
2,
'GB',
'11D10,130D7.5,2D4,5E4.5,730D,7D,815D,830D,830D4,8D,8D4,9D12',
'CONFLICT,OFC1,OFC10,OFC12,OFC2,OFC3,OFC4,OFC6,OFC8,RED,SCHOOL',
NULL
);
/*INSERT THE NEW SUB_GROUP*/
REM INSERTING into SUB_GROUP
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'Sect',
'1',
NULL,
'A',
NULL
);
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'Referral',
'2',
NULL,
'B',
NULL
);
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'Lead',
'3',
NULL,
'C',
NULL
);
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'Call Ctr',
'4',
NULL,
'D',
NULL
);
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'New Patient',
'5',
NULL,
'E',
NULL
);
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'Prior Auth',
'6',
NULL,
'F',
NULL
);
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'Scanning',
'7',
NULL,
'G',
NULL
);
INSERT
INTO SUB_GROUP
(
UNIT_ID,
SG_NAME,
SG_ID,
BB_INCL_IN_NUMBERS,
SG_ALPHA,
STOP_DATE
)
VALUES
(
'&UNIT_NAME',
'Orient',
'8',
NULL,
'H',
NULL
);
/*INSERT THE NEW SLOTS*/
REM INSERTING into SLOTS
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
1,
'23',
8,
'11p to 7a',
'N '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
2,
'7',
1,
'7a to 8a',
'D '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
3,
'8',
0.5,
'8a to 830a',
'D '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
4,
'830',
2.5,
'830a to 11a',
'D '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
5,
'11',
1,
'11a to 12p',
'D '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
6,
'12',
1.5,
'12p to 130p',
'D '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
7,
'1330',
2.5,
'130p to 4p',
'D '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
8,
'16',
1,
'4p to 5p',
'E '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
9,
'17',
4,
'5p to 9p',
'E '
);
INSERT
INTO SLOTS
(
UNIT_ID,
SLOT_ID,
SLOT_NAME,
HOURS,
DISCRIPTION,
SHIFT_CODE
)
VALUES
(
'&UNIT_NAME',
10,
'21',
2,
'9p to 11p',
'E '
);
/*INSERT THE NEW SLOT_LIMITS*/
REM INSERTING into SLOT_LIMITS
INSERT
INTO SLOT_LIMITS
(
UNIT_ID,
ROW_ID,
SUNDAY,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
ROW_TYPE,
HOLIDAY
)
VALUES
(
'&UNIT_NAME',
'1',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'SUB_GROUP',
'0,0,0,0,0,0,0,0,0,0'
);
INSERT
INTO SLOT_LIMITS
(
UNIT_ID,
ROW_ID,
SUNDAY,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
ROW_TYPE,
HOLIDAY
)
VALUES
(
'&UNIT_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0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'0,0,0,0,0,0,0,0,0,0',
'SUB_GROUP',
'0,0,0,0,0,0,0,0,0,0'
);
/*INSERT THE NEW UNIT_TIMES*/
REM INSERTING into UNIT_TIMES
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'11D10',
'9',
'5',
'11a to 930p',
'10',
'21:30'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'130D7.5',
'9',
'3',
'130p to 9p',
'7.5',
'21:00'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'2D4',
'8',
'2',
'2p to 6p',
'4',
'18:00'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'5E4.5',
'9',
'1',
'5p to 930p',
'4.5',
'21:30'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'730D',
'7',
'5',
'730a to 4p',
'8',
'16:00'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'7D',
'7',
'6',
'7a to 330p',
'8',
'15:30'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'815D',
'8',
'5',
'815a to 445p',
'8',
'16:45'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'830D',
'8',
'5',
'830a to 5p',
'8',
'17:00'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'830D4',
'5',
'2',
'830a to 1230p',
'4',
'12:30'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'8D',
'7',
'5',
'8a to 430p',
'8',
'16:30'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'8D4',
'5',
'3',
'8a to 12p',
'4',
'12:00'
);
INSERT
INTO UNIT_TIMES
(
UNIT_ID,
TIME_CODE,
END_TIME,
NUMBER_OF_SLOTS,
DISCRIPTION,
ASSOC_HOURS,
ACT_END_TM
)
VALUES
(
'&UNIT_NAME',
'9D12',
'9',
'6',
'9a to 9p',
'12',
'21:00'
);
/*INSERT THE NEW TIME_BLOCK_SPEC*/
REM INSERTING into TIME_BLOCK_SPEC
INSERT
INTO TIME_BLOCK_SPEC
(
UNIT_ID,
REMIND_1,
REMIND_2,
REMIND_3,
REMIND_4,
REMIND_5,
REMIND_6,
REMIND_7,
REMIND_8,
REMIND_9,
REMIND_10,
PREF_1,
PREF_2,
PREF_3,
PREF_4,
PREF_5,
PREF_6,
PREF_7,
PREF_8,
PREF_9,
PREF_10,
THIS_TB_STRT_DATE,
SJ_STRT_DT,
SJ_END_DT,
FS_POST_DT,
UTOPIA_DUE,
UTOPIA_DUE_TM,
SJ_STRT_TM,
SJ_END_TM,
FS_POST_TM
)
VALUES
(
'&UNIT_NAME',
'REMIND_1',
'REMIND_2',
'REMIND_3',
'REMIND_4',
'REMIND_5',
'REMIND_6',
'REMIND_7',
'REMIND_8',
'REMIND_9',
'REMIND_10',
'PREF_1',
'PREF_2',
'PREF_3',
'PREF_4',
'PREF_5',
'PREF_6',
'PREF_7',
'PREF_8',
'PREF_9',
'PREF_10',
to_date('21-DEC-08 00:00:00','DD-MON-RR HH24:MI:SS'),
27,20,17,27,
'07:00',
'15:00',
'07:00',
'15:00'
);
INSERT
INTO TIME_BLOCK_SPEC
(
UNIT_ID,
REMIND_1,
REMIND_2,
REMIND_3,
REMIND_4,
REMIND_5,
REMIND_6,
REMIND_7,
REMIND_8,
REMIND_9,
REMIND_10,
PREF_1,
PREF_2,
PREF_3,
PREF_4,
PREF_5,
PREF_6,
PREF_7,
PREF_8,
PREF_9,
PREF_10,
THIS_TB_STRT_DATE,
SJ_STRT_DT,
SJ_END_DT,
FS_POST_DT,
UTOPIA_DUE,
UTOPIA_DUE_TM,
SJ_STRT_TM,
SJ_END_TM,
FS_POST_TM
)
VALUES
(
'&UNIT_NAME',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
'PREF_1',
'PREF_2',
'PREF_3',
'PREF_4',
'PREF_5',
'PREF_6',
'PREF_7',
'PREF_8',
'PREF_9',
'PREF_10',
to_date('04-OCT-15 00:00:00','DD-MON-RR HH24:MI:SS'),
27,20,17,27,
'07:00',
'15:00',
'07:00',
'15:00'
);
INSERT
INTO TIME_BLOCK_SPEC
(
UNIT_ID,
REMIND_1,
REMIND_2,
REMIND_3,
REMIND_4,
REMIND_5,
REMIND_6,
REMIND_7,
REMIND_8,
REMIND_9,
REMIND_10,
PREF_1,
PREF_2,
PREF_3,
PREF_4,
PREF_5,
PREF_6,
PREF_7,
PREF_8,
PREF_9,
PREF_10,
THIS_TB_STRT_DATE,
SJ_STRT_DT,
SJ_END_DT,
FS_POST_DT,
UTOPIA_DUE,
UTOPIA_DUE_TM,
SJ_STRT_TM,
SJ_END_TM,
FS_POST_TM
)
VALUES
(
'&UNIT_NAME',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
'PREF_1',
'PREF_2',
'PREF_3',
'PREF_4',
'PREF_5',
'PREF_6',
'PREF_7',
'PREF_8',
'PREF_9',
'PREF_10',
TO_DATE('15-NOV-15 00:00:00','DD-MON-RR HH24:MI:SS'),
27,20,17,27,
'07:00',
'15:00',
'07:00',
'15:00'
);
/*COMMIT ALL CHANGES*/
COMMIT;
以上是关于sql 在MSS中湮灭然后重建一个单元(HFM_SECT)。的主要内容,如果未能解决你的问题,请参考以下文章