Browse Source

Bugfix Abmeldegrund personbezogen, Laden Standorte, unload Praxissemester und klin. Semester #5

bew_mzb
Daniel Quathamer 5 months ago
parent
commit
ffa899542a
  1. 12
      src-modules/module/costage/conf/costage.xml
  2. 16
      src-modules/module/costage/datentabellen/trans_costage_st_studierendenstammdaten.sql
  3. 102
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql
  4. 37
      src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml
  5. 20
      src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml
  6. 32
      src-modules/module/costage/schluesseltabellen/konstanten_fuellen.sql

12
src-modules/module/costage/conf/costage.xml

@ -483,7 +483,11 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" /> @@ -483,7 +483,11 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
<column name="second_nationality" type ="INTEGER" size ="4" default ="" notnull ="false" description="Amtl. Schluessel fuer zweite Staatsangehoerigkeit" currentlyUsed="false"/>
<column name="d_exmatr" type ="DATE" size ="4" default ="" notnull ="false" description="Datum der Exmatr. (obsolet)"/>
<column name="semester_max" type ="INTEGER" size ="4" default ="" notnull ="false" description="Letztes eingeschriebenes Semester" currentlyUsed=""/>
</columns>
<column name="abm_art_p" type ="CHAR" size ="10" default ="" notnull ="false" description="Art Abmeldung (personbezogen)" >
<sourcefield table="costage_st_personen_abmeldungen" name="st_abm_art_kurzbezeichnung" sourcesystem="co" />
<comment>Lookup via: st_sem_nr - costage_st_personen_abmeldungen.st_studstamm_nr/st_sem_nr - costage_st_semester.semester_tid / costage_st_personen_abmeldungen.person_flag='J'</comment>
</column>
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
@ -590,6 +594,12 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" /> @@ -590,6 +594,12 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
<sourcefield table="costage_st_personen_abmeldungen" name="st_abm_art_kurzbezeichnung" sourcesystem="co" />
<comment>Lookup via: st_studium_nr/st_sem_nr - costage_st_personen_abmeldungen.st_studium_nr/st_sem_nr - costage_st_semester.semester_tid / costage_st_abmeldungsarten.bezug='S'</comment>
</column>
<!--<column name="abm_datum_p" type ="DATE" size ="10" default ="" notnull ="false" description="Datum der Abmeldung (personbezogen)" >
<sourcefield table="costage_st_personen_abmeldungen" name="st_abm_art_kurzbezeichnung" sourcesystem="co" />
<comment>Lookup via: st_studium_nr/st_sem_nr - costage_st_personen_abmeldungen.st_studium_nr/st_sem_nr - costage_st_semester.semester_tid / costage_st_personen_abmeldungen.person_flag='J'</comment>
</column>-->
<column name="praxissemester" type ="INTEGER" size ="4" default ="" notnull ="false" description="Praxissemester" />
<column name="klinsem" type ="INTEGER" size ="4" default ="" notnull ="false" description="Klinische Semester" />
</columns>
<indexes>

16
src-modules/module/costage/datentabellen/trans_costage_st_studierendenstammdaten.sql

@ -18,6 +18,7 @@ d_geburt DATE , @@ -18,6 +18,7 @@ d_geburt DATE ,
ca12_staat INTEGER ,
second_nationality INTEGER ,
d_exmatr DATE ,
abm_art_p char(10),
semester_max INTEGER
)
;
@ -57,7 +58,7 @@ insert into tmp_st_studierendenstammdaten( @@ -57,7 +58,7 @@ insert into tmp_st_studierendenstammdaten(
-- ca12_staat,
-- second_nationality,
d_geburt,
d_exmatr,
-- d_exmatr,
semester_max)
select
S.st_studstamm_nr,
@ -77,7 +78,6 @@ when S.geschlecht='W' then 2 @@ -77,7 +78,6 @@ when S.geschlecht='W' then 2
when S.geschlecht='X' then 3
else 4 end)::smallint as geschlecht,
date(S.geburtsdatum) as d_geburt,
date(S.abmeldungsdatum) as d_exmatr,
M.semester_max
FROM costage_st_laender L, costage_st_studierendenstammdaten_neu S left outer join tmp_max M
on (M.st_studstamm_nr=S.st_studstamm_nr)
@ -85,6 +85,16 @@ where L.st_land_nr=S.st_land1_nr @@ -85,6 +85,16 @@ where L.st_land_nr=S.st_land1_nr
and S.matrikelnummer is not null
;
--TODO: statt semesterende das tatsächliche Abmeldungsdatum
update tmp_st_studierendenstammdaten set d_exmatr=date(S.semester_ende),
abm_art_p=A.st_abm_art_kurzbezeichnung
from costage_st_personen_abmeldungen A,costage_st_semester S
where A.st_sem_nr=S.st_sem_nr
and A.st_studstamm_nr=tmp_st_studierendenstammdaten.st_studstamm_nr
and S.semester_tid=tmp_st_studierendenstammdaten.semester_max
and A.person_flag='J';
update tmp_st_studierendenstammdaten set ca12_staat=val(L.statistik_code)
from costage_st_laender L
where L.st_land_nr=tmp_st_studierendenstammdaten.st_land1_nr;
@ -115,6 +125,7 @@ insert into costage_st_studierendenstammdaten( @@ -115,6 +125,7 @@ insert into costage_st_studierendenstammdaten(
second_nationality,
d_geburt,
d_exmatr,
abm_art_p,
semester_max)
select
st_studstamm_nr,
@ -134,6 +145,7 @@ st_studstamm_nr, @@ -134,6 +145,7 @@ st_studstamm_nr,
second_nationality,
d_geburt,
d_exmatr,
abm_art_p,
semester_max
FROM tmp_st_studierendenstammdaten
;

102
src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql

@ -41,7 +41,9 @@ null::integer as st_studiengang_nr_msg_primaerflag, @@ -41,7 +41,9 @@ null::integer as st_studiengang_nr_msg_primaerflag,
--null::integer as studienfach_sortierung,
null::char(10) as hrst,
null::integer as fachsemester,
null::integer as praxissemester,
null::integer as hssem,
null::integer as klinsem,
(case when SG.studiengangs_typ_kb in ('TSG') then SA.studienstatustyp else null::char(10) end) as statustyp_tsg,
(case when ST.hauptstudium_flag='J' then 1::smallint else 0::smallint end) as primaerflag_studien,
0::smallint as tsg_generated,
@ -145,7 +147,8 @@ drop table if exists tmp_studien_esg_tsg; @@ -145,7 +147,8 @@ drop table if exists tmp_studien_esg_tsg;
select *,
1::integer as primaerflag,
null::integer as letztes_tsg_semester,
null::integer as st_studium_nr_msg
null::integer as st_studium_nr_msg,
null::date as endedat_tsg
into temp tmp_studien_esg_tsg from tmp_studien T
where T.studiengangs_typ_kb in ('ESG','TSG')
and T.status_historie=1
@ -205,6 +208,30 @@ and F.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr @@ -205,6 +208,30 @@ and F.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr
and F.fachsemestertyp='FS'
;
select 35,timestamp_str(now()) from xdummy;
--praxissemester:
update tmp_studien_esg_tsg
set praxissemester=F.fachsemester
from costage_st_fachsemester F
where F.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr
and F.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr
and F.fachsemestertyp='PS'
;
select 36,timestamp_str(now()) from xdummy;
--klinsem
update tmp_studien_esg_tsg
set klinsem=F.fachsemester
from costage_st_fachsemester F
where F.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr
and F.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr
and F.fachsemestertyp='KS'
;
select 40,timestamp_str(now()) from xdummy;
update tmp_studien_esg_tsg
@ -236,6 +263,27 @@ and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung @@ -236,6 +263,27 @@ and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung
and A.bezug='S'
;
select 55,timestamp_str(now()) from xdummy;
--Endedatum bei TSG nachladen bei Abmeldungen:
update tmp_studien_esg_tsg set endedat_tsg=SA.gueltig_ab
from costage_st_studienstatus SA
where SA.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr
and SA.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr
and SA.studienstatustyp in ('Z','X')
and tmp_studien_esg_tsg.abm_art_s is not null
;
select 57,timestamp_str(now()) from xdummy;
update tmp_studien_esg_tsg set endedat=SA.gueltig_ab
from costage_st_studienstatus SA
where SA.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr
and SA.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr
and SA.studienstatustyp in ('Z','X')
and tmp_studien_esg_tsg.studiengangs_typ_kb='ESG'
and tmp_studien_esg_tsg.abm_art_s is not null
;
select 60,timestamp_str(now()) from xdummy;
@ -379,13 +427,15 @@ null::timestamp AS gueltig_ab, @@ -379,13 +427,15 @@ null::timestamp AS gueltig_ab,
null::integer as st_studienstatus_nr,
null::integer as primaerflag_studien_msg,
max(T.semester) as letztes_tsg_semester,
max(T.fachsemester) as fachsemester
max(T.fachsemester) as fachsemester,
max(T.praxissemester) as praxissemester,
max(T.klinsem) as klinsem
into temp tmp_studien_msg_tsg_fehlend2
from tmp_studien_msg_tsg_fehlend F, tmp_studien_tsg T
where F.st_studstamm_nr=T.st_studstamm_nr
and F.st_studiengang_nr_tsg=T.st_studiengang_nr
and T.semester=F.endsemester_tsg
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,23,24,25,26,27,28,29 ,30 ,31,32 ,33 ,34,35,36
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,23,24,25,26,27,28,29 ,30 ,31,32 ,33 ,34,35,36,37
;
update tmp_studien_msg_tsg_fehlend2 set
@ -449,6 +499,8 @@ hzb_land_nr, @@ -449,6 +499,8 @@ hzb_land_nr,
abm_art_s,
abm_art_s_msg,
fachsemester,
praxissemester,
klinsem,
studienfach_sortierung,
letztes_tsg_semester,
primaerflag_studien_msg
@ -490,6 +542,8 @@ hzb_land_nr, @@ -490,6 +542,8 @@ hzb_land_nr,
abm_art_s,
abm_art_s_msg,
fachsemester,
praxissemester,
klinsem,
studienfach_sortierung,
letztes_tsg_semester,
primaerflag_studien_msg
@ -571,6 +625,8 @@ hzb_land_nr, @@ -571,6 +625,8 @@ hzb_land_nr,
abm_art_s,
abm_art_s_msg,
fachsemester,
praxissemester,
klinsem,
studienfach_sortierung,
letztes_tsg_semester,
primaerflag_studien_msg,
@ -578,7 +634,9 @@ primaerflag_studien_msg, @@ -578,7 +634,9 @@ primaerflag_studien_msg,
null::integer as fach_nr,
null::integer as studiengang_nr,
null::char(10) as unikey,
null::integer as kz_rueck_beur_ein
null::integer as kz_rueck_beur_ein,
endedat,
endedat_tsg
into temp tmp_studien2
from tmp_studien_tsg;
@ -619,9 +677,12 @@ hzb_note, @@ -619,9 +677,12 @@ hzb_note,
hzb_land_nr,
abm_art_s,
fachsemester,
praxissemester,
klinsem,
studienfach_sortierung,
letztes_tsg_semester,
studiengangs_typ_kb
studiengangs_typ_kb,
endedat
)
select
semester,
@ -660,9 +721,12 @@ hzb_note, @@ -660,9 +721,12 @@ hzb_note,
hzb_land_nr,
abm_art_s,
fachsemester,
praxissemester,
klinsem,
1::integer as studienfach_sortierung,
letztes_tsg_semester,
studiengangs_typ_kb
studiengangs_typ_kb,
endedat
from tmp_studien_esg_tsg E
where E.studiengangs_typ_kb='ESG';
@ -770,6 +834,8 @@ hzb_land_nr, @@ -770,6 +834,8 @@ hzb_land_nr,
abm_art_s,
abm_art_s_msg,
fachsemester,
praxissemester,
klinsem,
studienfach_sortierung,
letztes_tsg_semester,
studiengangs_typ_kb,
@ -777,6 +843,8 @@ fach_nr, @@ -777,6 +843,8 @@ fach_nr,
studiengang_nr,
unikey,
kz_rueck_beur_ein,
endedat,
endedat_tsg,
null::char(10) as po_stp_stp_version_kb,
null::integer as po_regelstudienzeit,
null::integer as kz_rueck_beur_ein_tsg,
@ -785,7 +853,7 @@ into temp tmp_studien3 @@ -785,7 +853,7 @@ into temp tmp_studien3
from tmp_studien2 T left outer join costage_st_studien_spoversionen SPO
on (SPO.st_studium_nr=T.st_studium_nr
and SPO.gueltig_ab < T.semester_ende)
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44 --,45,46,47,48,49,50,51,52
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45 ,46, 47,48 --,49,50,51,52
;
select 160,timestamp_str(now()) from xdummy;
@ -827,6 +895,8 @@ st_studium_nr, @@ -827,6 +895,8 @@ st_studium_nr,
hrst,
semester,
fachsemester,
praxissemester,
klinsem,
hssem,
primaerflag,
studiengang_nr,
@ -865,6 +935,8 @@ select st_studium_nr, @@ -865,6 +935,8 @@ select st_studium_nr,
hrst,
semester,
fachsemester,
praxissemester,
klinsem,
hssem,
primaerflag,
--Nun ist studiengang_nr=1 definiert. Die restlichen werden mit RANK ermittelt:
@ -883,9 +955,11 @@ select st_studium_nr, @@ -883,9 +955,11 @@ select st_studium_nr,
beginn_datum as anfdat,
(case when studienstatustyp not in ('Z','X') then gueltig_ab
else null::date end) as ruebeudat,
(case when studienstatustyp in ('Z','X') then gueltig_ab
(case when endedat is not null then endedat
when studienstatustyp in ('Z','X') then gueltig_ab
else null::date end) as endedat,
(case when statustyp_tsg in ('Z','X') then gueltig_ab
(case when endedat_tsg is not null then endedat_tsg
when statustyp_tsg in ('Z','X') then gueltig_ab
else null::date end) as endedat_tsg,
studienform_statistik_code as stufrm,
kz_rueck_beur_ein,
@ -921,6 +995,8 @@ st_studium_nr, @@ -921,6 +995,8 @@ st_studium_nr,
hrst,
semester,
fachsemester,
praxissemester,
klinsem,
hssem,
primaerflag,
studiengang_nr,
@ -959,6 +1035,8 @@ select st_studium_nr, @@ -959,6 +1035,8 @@ select st_studium_nr,
hrst,
semester,
fachsemester,
praxissemester,
klinsem,
hssem,
primaerflag,
--Nun ist studiengang_nr=1 definiert. Die restlichen werden mit RANK ermittelt:
@ -978,9 +1056,11 @@ cast (NULL as int) as studiengang_nr2, @@ -978,9 +1056,11 @@ cast (NULL as int) as studiengang_nr2,
beginn_datum as anfdat,
(case when studienstatustyp not in ('Z','X') then gueltig_ab
else null::date end) as ruebeudat,
(case when studienstatustyp in ('Z','X') then gueltig_ab
(case when endedat is not null then endedat
when studienstatustyp in ('Z','X') then gueltig_ab
else null::date end) as endedat,
(case when statustyp_tsg in ('Z','X') then gueltig_ab
(case when endedat_tsg is not null then endedat_tsg
when statustyp_tsg in ('Z','X') then gueltig_ab
else null::date end) as endedat_tsg,
studienform_statistik_code as stufrm,
kz_rueck_beur_ein,

37
src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml

@ -98,7 +98,7 @@ null::integer ,--poplz, @@ -98,7 +98,7 @@ null::integer ,--poplz,
null::integer ,--poort,
date(aufnahmedatum) as immdat,
null::integer ,--beugrund as gdbu,
null::char(1) as gdex,
abm_art_p as gdex,
ca12_staat,
null::integer as bland,
null::char(1) ,--hssem,
@ -214,7 +214,7 @@ F.fachsemester::integer, @@ -214,7 +214,7 @@ F.fachsemester::integer,
F.hrst,
null::integer as klinsem,
F.hssem,
'' ,--stuart,
(case when praxissemester >0 then '3' else '' end) as stuart,
'' ,--stutyp,
F.stufrm,
'' ,--stort,
@ -241,9 +241,13 @@ null::char(10) as hssem_valid, @@ -241,9 +241,13 @@ null::char(10) as hssem_valid,
null::Char(10) as k_field_of_study_subj_id,
F.kz_rueck_beur_ein_tsg,
endedat_tsg,
abm_art_s_msg as abmeldegrund,
abm_art_s as abmeldegrund_tsg,
F.studiengangs_identifikator_msg as degree_program_uniquename
(case when G.studiengangs_typ_kb='TSG' then abm_art_s_msg
else abm_art_s end) as abmeldegrund,
(case when G.studiengangs_typ_kb='TSG' then abm_art_s
else null::char(10)
end) as abmeldegrund_tsg,
(case when G.studiengangs_typ_kb='TSG' then F.studiengangs_identifikator_msg
else G.studiengangs_identifikator end) as degree_program_uniquename
FROM costage_st_studiengaenge G, costage_st_studien_aggr F
WHERE G.st_studiengang_nr=F.st_studiengang_nr
@ -853,6 +857,29 @@ null as lid, @@ -853,6 +857,29 @@ null as lid,
null as parent_lid,
null as sortorder
FROM costage_st_studiengaenge
union
--stuart
SELECT
616,
0,
'3',--praxissem,
'Praxis' as ktxt,
'Praxissemester' as dtxt,
'Praxissemester' as ltxt ,
'3' as astat,
' ',
'3',--Praxissemester,
' ',
' ',
null::date as gueltig_von,
null::date as gueltig_bis,
'3', --sourcesystem_id
' ' , --hiskey_id
' ' , --struktur_c
null as lid,
null as parent_lid,
null as sortorder
FROM xdummy
;
]]>

20
src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml

@ -52,9 +52,9 @@ null,--bew_efh, @@ -52,9 +52,9 @@ null,--bew_efh,
null,--bew_vorname,
null,--bew_gebname,
null,--bew_gebort,
d_geburt as bew_gebdat,
geschlecht as geschl,
ca12_staat as staat,
date(S.geburtsdatum) as bew_gebdat,
S.geschlecht as geschl,
val(L.statistik_code) as staat,
null,--pozusatz,
null,--postrasse,
null,--poplz,
@ -126,7 +126,7 @@ null,--bew_efh, @@ -126,7 +126,7 @@ null,--bew_efh,
null,--zusastrasse,
null,--zusaort,
null,--ord_kuenstname,
ca12_staat as gebland,
val(L.statistik_code) as gebland,
null,--dokvorname,
null,--bew_zvs_zusatz,
null,--bew_bewnrhist,
@ -158,10 +158,12 @@ null,--bew_efh, @@ -158,10 +158,12 @@ null,--bew_efh,
null, --zvs_ekritpaket_18,
null --zvs_spezkrit
FROM
costage_bw_antr_aggr B,costage_st_studierendenstammdaten S
where S.st_studstamm_nr=B.st_studstamm_nr
and B.bw_typ_kb !='MBW'
;
costage_bw_antr_aggr B left outer join costage_st_studierendenstammdaten_neu S
on (S.st_studstamm_nr=B.st_studstamm_nr)
left outer join
costage_st_laender L
on( L.st_land_nr=S.st_land1_nr)
where B.bw_typ_kb !='MBW'
]]>
</extraction-sql>
@ -186,7 +188,7 @@ A.fachsemester as stgsem, @@ -186,7 +188,7 @@ A.fachsemester as stgsem,
null,--stgspz,
null,--dowunsch1,
null,--dowunsch2,
null, --antr_stort,
(case when exists(select id from sx_repository R where R.id='COSTAGE_STORT' and aktiv=1) then G.stort_nr else null::char(10) end ) as antr_stort,
null,--haerteantr,
null,--haerte,
null,--haertegrd,

32
src-modules/module/costage/schluesseltabellen/konstanten_fuellen.sql

@ -41,7 +41,7 @@ beschreibung, @@ -41,7 +41,7 @@ beschreibung,
'Teilstudiengänge Status aus MSG ausdehnen',
310,
'',--doku link
'https://www.superx-projekt.de/doku/costage_modul/admin/f_Konstanten.htm',--doku link
0,
'1,Ja'|| ${newline} || '0,Nein',
'>0.3',
@ -65,15 +65,39 @@ beschreibung, @@ -65,15 +65,39 @@ beschreibung,
'Anzahl der Semester, für die rückwirkend Einzelprüfungen berechnet werden',
310,
'Modul_Studienerfolg_Admin-HISinOne.xhtml#Konstanten',
'https://www.superx-projekt.de/doku/costage_modul/admin/f_Konstanten.htm',
0 ,
null::Char(1),
'2023.06',
'0.3',
'Datenquelle, Entladestartzeitpunkt, -umfang',
120);
310);
insert into tmp_konstanten(apnr,
beschreibung,
defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id)
values (0,
'SOS_CO_allow_external',
0,
'Erlaube externe Hochschuldaten',
310,
'https://www.superx-projekt.de/doku/costage_modul/admin/f_Konstanten.htm',
0 ,
'1,Ja'|| ${newline} || '0,Nein',
'0.5',
'Datenquelle, Entladestartzeitpunkt, -umfang',
310);
--vorhandene Schlüssel Metadaten updaten:
<#if SQLdialect='Postgres'>

Loading…
Cancel
Save