-- Customer specific once-script
-- ATCHoogeveen
-- (c) 2010 SG|facilitor bv 
-- $Revision$ 
-- $Id$
--
-- Support: +31 53 4800710

SET ECHO ON;
SPOOL atch9.lst;

-- Klachtenregistratie vereist dat startdatum niet meer in cust.inc staat, maar nu in database
UPDATE MLD_DISC_PARAMS
SET MLD_DISC_PARAMS_STARTDATUM = 1
WHERE MLD_INS_DISCIPLINE_KEY IN
(SELECT INS_DISCIPLINE_KEY
FROM MLD_DISCIPLINE d
WHERE d.ins_srtdiscipline_key = 1);

---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---
-- Menutaken wijzigen
---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---


INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 1600, 'Overzicht beschikkingen', 'appl/mld/mld_search.asp?urole=fo' || '&' || 'srtdisc=1', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDFOF';

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 1700, '> Nieuwe beschikking', 'appl/mld/mld_melding.asp?urole=fo' || '&' || 'srtdisc=1', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDFOF';

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 1800, 'Afhandelen beschikkingen', 'appl/mld/mld_search.asp?urole=bo' || '&' || 'srtdisc=1', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDBOF';

-- Menutaak 'Notities': volgnummer aanpassen.
UPDATE fac_menu
SET fac_menu_volgnr = 1900
WHERE fac_menuitems_key = 40;

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_altgroep)
SELECT 2000, 'Klachten', 1 FROM DUAL;

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 2100, 'Overzicht klachten', 'appl/mld/mld_search.asp?urole=fo' || '&' || 'srtdisc=2', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDFOF';

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 2200, '> Nieuwe klacht', 'appl/mld/mld_melding.asp?urole=fo' || '&' || 'srtdisc=2', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDFOF';

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 2400, 'Afhandelen klachten', 'appl/mld/mld_search.asp?urole=bo' || '&' || 'srtdisc=2', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDBOF';

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 4800, 'Beschikkingen', 'appl/mld/mld_search.asp?urole=mi' || '&' || 'srtdisc=1', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDBAC';

INSERT INTO fac_menu (fac_menu_volgnr, fac_menu_altlabel, fac_menu_alturl, fac_menu_altgroep, fac_functie_key)
SELECT 4810, 'Klachten', 'appl/mld/mld_search.asp?urole=mi' || '&' || 'srtdisc=2', 1, fac_functie_key
FROM fac_functie f
WHERE f.fac_functie_code = 'WEB_MLDBAC';

-- Oude menutaken verwijderen:

-- Oude menutaak 'Overzicht beschikkingen'
DELETE fac_menu
WHERE fac_menu_key = 50;

-- Oude menutaak '>Type' (die alle vakgroepen explodeert)
DELETE fac_menu
WHERE fac_menu_key = 89;


-- Oude menutaak 'Afhandelen meldingen (onder de menukop Zorgopdrachten'
DELETE fac_menu
WHERE fac_menu_key = 147;

-- 'Maninfo beschikkingen': verwijderen.
DELETE fac_menu
WHERE fac_menuitems_key = 48;


---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---
-- MODULE Klachten registratie 
---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---   ---

INSERT INTO ins_srtdiscipline
(ins_srtdiscipline_key, ins_srtdiscipline_module, ins_srtdiscipline_omschrijving,
 ins_srtdiscipline_kostenklant, ins_srtdiscipline_alg, ins_srtdiscipline_ins,
 ins_srtdiscipline_mld
) VALUES(2,'MLD','Klacht',0,1,0,0);

INSERT INTO ins_tab_discipline
(ins_discipline_module,  ins_discipline_omschrijving, ins_srtdiscipline_key)
VALUES('MLD','Klachten over verzorger',2);

INSERT INTO mld_disc_params(mld_ins_discipline_key, mld_disc_params_notify)
SELECT ins_discipline_key,0 FROM ins_tab_discipline WHERE ins_discipline_omschrijving = 'Klachten over verzorger';

INSERT INTO mld_stdmelding
(mld_ins_discipline_key, mld_stdmelding_omschrijving, mld_stdmelding_urgentie, mld_stdmelding_freetext)
SELECT max(ins_discipline_key),'Slechte kwaliteit geleverd',4,2 FROM ins_tab_discipline;

INSERT INTO mld_stdmelding
(mld_ins_discipline_key, mld_stdmelding_omschrijving, mld_stdmelding_urgentie, mld_stdmelding_freetext)
SELECT max(ins_discipline_key),'Niet komen opdagen',4,2 FROM ins_tab_discipline;

INSERT INTO mld_stdmelding
(mld_ins_discipline_key, mld_stdmelding_omschrijving, mld_stdmelding_urgentie, mld_stdmelding_freetext)
SELECT max(ins_discipline_key),'Schade',4,2 FROM ins_tab_discipline;

INSERT INTO mld_stdmelding
(mld_ins_discipline_key, mld_stdmelding_omschrijving, mld_stdmelding_urgentie, mld_stdmelding_freetext)
SELECT max(ins_discipline_key),'Houding en/of communicatie',4,2 FROM ins_tab_discipline;

INSERT INTO ins_tab_discipline
(ins_discipline_module,  ins_discipline_omschrijving, ins_srtdiscipline_key)
VALUES('MLD','Klachten over zorgaanbieder',2);

INSERT INTO mld_disc_params(mld_ins_discipline_key, mld_disc_params_notify)
SELECT ins_discipline_key,0 FROM ins_tab_discipline WHERE ins_discipline_omschrijving = 'Klachten over zorgaanbieder';

INSERT INTO mld_stdmelding
(mld_ins_discipline_key, mld_stdmelding_omschrijving, mld_stdmelding_urgentie, mld_stdmelding_freetext)
SELECT max(ins_discipline_key),'Afspraak niet nagekomen',4,2 FROM ins_tab_discipline;

INSERT INTO mld_stdmelding
(mld_ins_discipline_key, mld_stdmelding_omschrijving, mld_stdmelding_urgentie, mld_stdmelding_freetext)
SELECT max(ins_discipline_key),'Houding en/of communicatie',4,2 FROM ins_tab_discipline;

INSERT INTO mld_stdmelding
(mld_ins_discipline_key, mld_stdmelding_omschrijving, mld_stdmelding_urgentie, mld_stdmelding_freetext)
SELECT max(ins_discipline_key),'Onduidelijke informatie',4,2 FROM ins_tab_discipline;

-- Autorisatiegroepen met rechten voor klachten: FO, BO en MI.

INSERT INTO fac_groep (fac_groep_omschrijving) VALUES ('FO-MLD: Klachten');

INSERT INTO fac_groeprechten(fac_groep_key, fac_functie_key, ins_discipline_key,
            fac_gebruiker_prs_level_read, fac_gebruiker_alg_level_read,
            fac_gebruiker_prs_level_write, fac_gebruiker_alg_level_write)
SELECT g.fac_groep_key,f.fac_functie_key, d.ins_discipline_key, 1, -1, 1, -1
FROM fac_groep g, fac_functie f, mld_discipline d
WHERE g.fac_groep_omschrijving = 'FO-MLD: Klachten'
AND f.fac_functie_code = 'WEB_MLDFOF'
AND d.ins_srtdiscipline_key = 2;

INSERT INTO fac_groep (fac_groep_omschrijving) VALUES ('BO-MLD: Klachten');

INSERT INTO fac_groeprechten(fac_groep_key, fac_functie_key, ins_discipline_key, 
            fac_gebruiker_prs_level_read, fac_gebruiker_alg_level_read,
            fac_gebruiker_prs_level_write, fac_gebruiker_alg_level_write)
SELECT g.fac_groep_key,f.fac_functie_key, d.ins_discipline_key, -1, -1, -1, -1
FROM fac_groep g, fac_functie f, mld_discipline d
WHERE g.fac_groep_omschrijving = 'BO-MLD: Klachten'
AND f.fac_functie_code = 'WEB_MLDBOF'
AND d.ins_srtdiscipline_key = 2;

INSERT INTO fac_groep (fac_groep_omschrijving) VALUES ('MI: Klachten');

INSERT INTO fac_groeprechten(fac_groep_key, fac_functie_key, ins_discipline_key,
            fac_gebruiker_prs_level_read, fac_gebruiker_alg_level_read,
            fac_gebruiker_prs_level_write, fac_gebruiker_alg_level_write)
SELECT g.fac_groep_key,f.fac_functie_key, d.ins_discipline_key, -1, -1, 9, 9
FROM fac_groep g, fac_functie f, mld_discipline d
WHERE g.fac_groep_omschrijving = 'MI: Klachten'
AND f.fac_functie_code = 'WEB_MLDBAC'
AND d.ins_srtdiscipline_key = 2;

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikkingsnr'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_SEARCH_DIFF_FIELDS';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Team'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_VAKGROUP';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Zorg'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_COMPLAIN';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikkingen'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_COMPLAINS';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Selecteer de huishoudelijke hulp...'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_SELECT_UITVOERENDE';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Selecteer een team ...'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_SELECT_VAKGROEP';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Selecteer de soort zorg ...'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_SELECT_STDMELDING';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Toewijzing aan team'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_CATEGORIE';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Teamleider'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_BEHANDELAAR';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikking is geregistreerd'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_IS_MLDNEW';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikking is gewijzigd'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_IS_MLDUPD';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikking is afgemeld'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_IS_MLDAFM';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikking is afgewezen'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_IS_MLDREJ';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Deze beschikking kan niet afgewezen worden'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_REJECT_FAILED';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikking '
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_REJECTED1';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikking'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_COMPLAIN';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikkingsgegevens'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_FRAME_ALGEMEEN';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Beschikkingstatus'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_STATUSFILTERS';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Bij team'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_CHK_FO_MLDBUSY';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Neem deze beschikking als frontoffice (zelf) in behandelin'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_DOACTION_HINT';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Zet de behandeling door naar het team'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_DOORZET_HINT';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Accepteer deze beschikking voor behandeling'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_ACCEPT_HINT';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Wijs deze beschikking af (wordt niet verder behandeld)'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_REJECT_HINT';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Sluit deze beschikking direct af, de afhandeling is direct gereed.'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_CLOSE_HINT';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Accepteer deze beschikking en maak direct een opdracht aan'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_ORDERS_HINT';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Accepteer deze beschikking en maak direct een bestelling aan'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_BES_HINT';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Soortgelijke beschikkingen'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_SIMILARCALLS';


INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Selecteer een gemeente'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL.MLD.SELECT_NOLOC_SELECTED';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Alle opdrachten van beschikking '
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL.MLD.OPDR_CLOSED_3';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Team'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL.MLD.VAKGROEP';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL',''
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL.MLD.PERSON_PREFIX';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Selecteer eerst regel uit zorg'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL.MLD.SELECT_NOSTDMLD_SELECTED';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,1,'NL','Status'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL.MLD.MLDSTATUS';

--
--
-- Vanaf hier de terminologie voor klachten *** klachten *** klachten *** klachten *** klachten
--
--

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,2,'NL','Klachtgegevens'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_CATEGORIE';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY, 2 ,'NL','Klacht over'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_VAKGROUP';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,2,'NL','Klacht over'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL.MLD.VAKGROEP';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,2,'NL','Selecteer waarover klacht gaat...'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_SELECT_VAKGROEP';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,2,'NL','Selecteer de soort klacht ...'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_SELECT_STDMELDING';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,2,'NL','Soort klacht'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_COMPLAIN';

INSERT INTO FAC_LOCALE (FAC_LOCALEITEMS_KEY, FAC_LOCALE_DIALECT_KEY, FAC_LOCALE_LANG, FAC_LOCALE_TEKST)
SELECT FAC_LOCALEITEMS_KEY,2,'NL','Behandelaar'
FROM FAC_LOCALEITEMS
WHERE UPPER(FAC_LOCALEITEMS_DIALECT_ID)='MLD_SRTDISCIPLINE_KEY'
AND UPPER(FAC_LOCALEITEMS_LCL) = 'LCL_MLD_BEHANDELAAR';



BEGIN adm.systrackscript('$Workfile: atch9.sql $', '$Revision$', 1); END;
/

COMMIT;
SPOOL OFF;
