Browse Source

Promstat semesterweise

master
Daniel Quathamer 9 months ago
parent
commit
198f6589c0
  1. 29
      src-modules/module/promstat/conf/promstat.xml
  2. 156
      src-modules/module/promstat/hilfstabellen/promstat_docprogram_aggr_fuellen.sql
  3. 29
      src-modules/module/promstat/masken/46000_felderinfo.unl
  4. 1
      src-modules/module/promstat/masken/46000_masken_felder_bez.unl
  5. 10
      src-modules/module/promstat/masken/46000_maskeninfo.unl

29
src-modules/module/promstat/conf/promstat.xml

@ -15,10 +15,12 @@ system="Promovierendenstatistik (Erw.)" thema="Promovierendenstatistik (Erw.)" t @@ -15,10 +15,12 @@ system="Promovierendenstatistik (Erw.)" thema="Promovierendenstatistik (Erw.)" t
</description>
<columns>
<column name="person_id" type="INTEGER" size="4" default="" notnull="true" description="Person-ID" />
<column name="registrationnumber" type="INTEGER" size="4" default="" notnull="false" description="Registriernummer" />
<column name="degree_program_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Studiengang" />
<column name="doctoral_program_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Promotionsvorhaben"/>
<column name="sem_rueck_beur_ein" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Semester" />
<column name="examplan_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Promotionszugangsberechtigung" ><comment>Leistung, die zur Aufnahme einer Promotion berechtigt</comment></column>
<column name="abschlusspruefung_examplan_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Promotionszugangsberechtigung" ><comment>Leistung, die zur Aufnahme einer Promotion berechtigt</comment></column>
<column name="examplan_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Promotionsleistung" ><comment>Leistung zur Verbuchung der Promotion</comment></column>
<column name="course_of_study_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Studiengang" />
<column name="astat_bund" type ="CHAR" size ="10" default ="" notnull ="false" description="Abschluss (amtlich Bund)" currentlyUsed="false" ><comment>Amtlicher Statistikschlüssel des Bundes für den Abschluß</comment></column>
<column name="astat_land" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Abschluss (amtlich Land)" currentlyUsed="false" ><comment>Schlüssel für die Meldung an das Land</comment></column>
@ -54,12 +56,34 @@ system="Promovierendenstatistik (Erw.)" thema="Promovierendenstatistik (Erw.)" t @@ -54,12 +56,34 @@ system="Promovierendenstatistik (Erw.)" thema="Promovierendenstatistik (Erw.)" t
<column name="prev_exam_degree_bund" type ="CHAR" size ="10" default ="" notnull ="false" description="Zur Promotion berechtigender Abschluss (Bund)" />
<column name="doccand_status_astat" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Status der Promotion (amtl.)" ><comment>1 = erstregistriert, 2 = neuregistriert, 3 = laufend, 4 = Beurlaubung / Unterbrechung, 5 = Abschluss der Promotion (bestanden oder endgültig nicht bestanden), 6 = Abbruch der Promotion</comment>
</column>
<column name="abschlusspruefung_pnote" type ="FLOAT" size ="10" default ="" notnull ="false" description="Note des Promotion berechtigenden Abschluss" />
<column name="pnote" type ="FLOAT" size ="10" default ="" notnull ="false" description="Gesamtnote" />
<column name="summe" type ="INTEGER" size ="255" default ="" notnull ="false" description="Summe" ><comment></comment></column>
</columns>
</table>
<views>
<view name="promstat_k_doccand_status_astat" version="0.6">
<description>View als Schüsselview für Status Prom. (ASTAT)</description>
<columns>
<column name="apnr" type ="VARCHAR" size ="255" default ="" isKey="true" notnull ="true" />
<column name="druck" type ="VARCHAR" size ="255" default ="" notnull ="true" />
</columns>
<sql dbsystem=""><![CDATA[
SELECT '1'::varchar(255) as apnr, 'Erstregistrierung'::varchar(255) as druck from xdummy
union
SELECT '2'::varchar(255) as apnr, 'Neuregistrierung'::varchar(255) as druck from xdummy
union
SELECT '3'::varchar(255) as apnr, 'Laufend'::varchar(255) as druck from xdummy
union
SELECT '4'::varchar(255) as apnr, 'Beurlaubung / Unterbrechung'::varchar(255) as druck from xdummy
union
SELECT '5'::varchar(255) as apnr, 'Abschluss'::varchar(255) as druck from xdummy
union
SELECT '6'::varchar(255) as apnr, 'Abbruch'::varchar(255) as druck from xdummy
]]></sql>
</view>
</views>
@ -136,6 +160,9 @@ system="Promovierendenstatistik (Erw.)" thema="Promovierendenstatistik (Erw.)" t @@ -136,6 +160,9 @@ system="Promovierendenstatistik (Erw.)" thema="Promovierendenstatistik (Erw.)" t
</relation>
<relation from="semester" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="eintrag" format="%s">
<relation-column from="tid" to="prev_exam_semester" />
</relation>
<relation from="promstat_k_doccand_status_astat" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="doccand_status_astat" />
</relation>
<!--ungeklärt: <relation from="kenn_abschl_astat" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="dtxt" format="%s">

156
src-modules/module/promstat/hilfstabellen/promstat_docprogram_aggr_fuellen.sql

@ -1,12 +1,61 @@ @@ -1,12 +1,61 @@
SELECT P.his_person_id,
P.degree_program_id,
P.doctoral_program_id,
P.sem_rueck_beur_ein,
P.examplan_id as abschlusspruefung_examplan_id,
P.course_of_study_id,
substring(P.astat_bund from 1 for 10) as astat_bund,
P.astat_land,
P.k_type_of_doctorate,
P.gueltig_von as dpp_gueltig_von,
P.gueltig_bis as dpp_gueltig_bis,
P.finished,
P.structured_doctoral_program_id,
P.stu_employment_business_id,
P.stu_employment_startdate,
P.stu_employment_enddate,
P.k_examform_id,
P.k_examform_un,
P.k_place_of_studies_astat,
D.registrationnumber,
D.geschlecht_astat,
D.staatsangehoerigkeit_1_astat,
D.staatsangehoerigkeit_2_astat,
D.hzb_datum,
year(D.hzb_datum) as hzb_jahr,
substring(D.hzb_type_astat from 1 for 10) as hzb_type_astat,
val(D.hzb_kreis_astat) as hzb_kreis_astat,
val(D.hzb_staat_astat) as hzb_staat_astat,
D.first_external_semester,
val(substring('' || D.first_external_semester from 1 for 4)) as first_external_year,
val(D.first_external_country_astat) as first_external_country_astat,
substring(first_external_university_astat from 1 for 10) as first_external_university_astat,
D.doccand_status_astat,
DATA.active_since,
DATA.end_date ,
DATA.examplan_id
into temp tmp_prom
FROM prom_promotionen P left outer join prom_promovierende D
on (P.his_person_id=D.his_person_id)
left outer join prom_promotion_data DATA
on (P.doctoral_program_id=DATA.doctoral_program_id)
--where P.his_person_id=118382
--
;
--update tmp_prom set end_date=date_val('01.01.3000') where end_date is null;
truncate table promstat_docprogram_aggr;
insert into promstat_docprogram_aggr( person_id,
registrationnumber,
degree_program_id,
doctoral_program_id,
sem_rueck_beur_ein,
examplan_id,
abschlusspruefung_examplan_id,
course_of_study_id,
astat_bund,
astat_land,
@ -34,65 +83,72 @@ insert into promstat_docprogram_aggr( person_id, @@ -34,65 +83,72 @@ insert into promstat_docprogram_aggr( person_id,
first_external_country_astat,
first_external_university_astat,
doccand_status_astat,
examplan_id,
summe
)
SELECT P.his_person_id,
P.degree_program_id,
P.doctoral_program_id,
P.sem_rueck_beur_ein,
P.examplan_id,
P.course_of_study_id,
substring(P.astat_bund from 1 for 10),
P.astat_land,
P.k_type_of_doctorate,
P.gueltig_von,
P.gueltig_bis,
P.finished,
P.structured_doctoral_program_id,
P.stu_employment_business_id,
P.stu_employment_startdate,
P.stu_employment_enddate,
P.k_examform_id,
P.k_examform_un,
P.k_place_of_studies_astat,
D.geschlecht_astat,
D.staatsangehoerigkeit_1_astat,
D.staatsangehoerigkeit_2_astat,
D.hzb_datum,
year(D.hzb_datum),
substring(D.hzb_type_astat from 1 for 10),
val(D.hzb_kreis_astat),
val(D.hzb_staat_astat),
D.first_external_semester,
val(substring('' || D.first_external_semester from 1 for 4)) as first_external_year,
val(D.first_external_country_astat),
substring(first_external_university_astat from 1 for 10),
D.doccand_status_astat,
select his_person_id,
registrationnumber,
degree_program_id,
doctoral_program_id,
S.tid as sem_rueck_beur_ein,
abschlusspruefung_examplan_id,
course_of_study_id,
astat_bund,
astat_land,
k_type_of_doctorate,
active_since as gueltig_von,
end_date as gueltig_bis,
finished,
structured_doctoral_program_id,
stu_employment_business_id,
stu_employment_startdate,
stu_employment_enddate,
k_examform_id,
k_examform_un,
k_place_of_studies_astat,
geschlecht_astat,
staatsangehoerigkeit_1_astat,
staatsangehoerigkeit_2_astat,
hzb_datum,
hzb_jahr,
hzb_type_astat,
hzb_kreis_astat,
hzb_staat_astat,
first_external_semester,
first_external_year,
first_external_country_astat,
first_external_university_astat,
doccand_status_astat,
-- active_since,
--end_date ,
examplan_id,
count(*)
FROM prom_promotionen P left outer join prom_promovierende D
on (P.his_person_id=D.his_person_id)
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,24,25,26,27,28,29,30,31,32
;
from semester S,tmp_prom T
where T.active_since <= S.sem_beginn
and (T.end_date <= S.sem_ende or T.end_date is null)
and S.sem_ende <= today()
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,24,25,26,27,28,29,30,31,32,33,34
;
update promstat_docprogram_aggr set prev_exam_university_astat=A.ext_university_astat,
prev_exam_country_astat=val(ext_country_astat),
prev_exam_degree_land=substring(ext_degree_land_astat from 1 for 10),
prev_exam_degree_bund=substring(ext_degree_bund_astat from 1 for 10)
from prom_abschlusspruefungen A
where A.examplan_id=promstat_docprogram_aggr.examplan_id
where A.examplan_id=promstat_docprogram_aggr.abschlusspruefung_examplan_id
;
update promstat_docprogram_aggr set prev_exam_semester=E.sem_der_pruefung
from lm_examplan E
where E.id=promstat_docprogram_aggr.examplan_id;
where E.id=promstat_docprogram_aggr.abschlusspruefung_examplan_id;
--nur wenn lm_examplan nichts findet:
update promstat_docprogram_aggr set prev_exam_semester=S.tid
from prom_abschlusspruefungen A, semester S
where promstat_docprogram_aggr.prev_exam_semester is null
and A.examplan_id=promstat_docprogram_aggr.examplan_id
and A.examplan_id=promstat_docprogram_aggr.abschlusspruefung_examplan_id
and A.examination_date between S.sem_beginn and S.sem_ende
;
@ -102,14 +158,14 @@ update promstat_docprogram_aggr set prev_exam_year=val(substring('' || prev_exam @@ -102,14 +158,14 @@ update promstat_docprogram_aggr set prev_exam_year=val(substring('' || prev_exam
update promstat_docprogram_aggr set
prev_exam_degree_land=substring(int_degree_land_astat from 1 for 10)
from prom_abschlusspruefungen A
where A.examplan_id=promstat_docprogram_aggr.examplan_id
where A.examplan_id=promstat_docprogram_aggr.abschlusspruefung_examplan_id
and promstat_docprogram_aggr.prev_exam_degree_land is null
;
update promstat_docprogram_aggr set
prev_exam_degree_bund=substring(int_degree_bund_astat from 1 for 10)
from prom_abschlusspruefungen A
where A.examplan_id=promstat_docprogram_aggr.examplan_id
where A.examplan_id=promstat_docprogram_aggr.abschlusspruefung_examplan_id
and promstat_docprogram_aggr.prev_exam_degree_bund is null
;
@ -119,7 +175,19 @@ and promstat_docprogram_aggr.prev_exam_degree_bund is null @@ -119,7 +175,19 @@ and promstat_docprogram_aggr.prev_exam_degree_bund is null
-- update promstat_docprogram_aggr set abschluss_astat_bund=substring(abschluss_astat_bund from 2 for 2)
-- where length(abschluss_astat_bund)=3;
--
update promstat_docprogram_aggr set abschlusspruefung_pnote=E.pnote
from lm_examplan E
where E.id=promstat_docprogram_aggr.abschlusspruefung_examplan_id;
update promstat_docprogram_aggr set pnote=E.pnote
from lm_examplan E
where E.id=promstat_docprogram_aggr.examplan_id;
--statusänderung semesterweise:
update promstat_docprogram_aggr set doccand_status_astat = S.doccand_status_astat
from prom_promovierende_temporal_status S, semester E
where S.gueltig_von <= E.sem_ende
and promstat_docprogram_aggr.sem_rueck_beur_ein=E.tid
and promstat_docprogram_aggr.person_id=S.his_person_id
;

29
src-modules/module/promstat/masken/46000_felderinfo.unl

@ -1,15 +1,16 @@ @@ -1,15 +1,16 @@
46000^Fächer^4^0^0^170^200^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='KENN-Fächer-Sicht' order by sortnr,name;^ ^^
46001^Seit Semester^2^0^0^170^150^1^integer^30^0^1^<<SQL>> select tid, druck from kenn_semester order by tid DESC;^^<<SQL>> select tid,druck from kenn_semester where today() between sem_beginn and sem_ende;^
46002^Registriernummer^100^350^-1^150^180^1^integer^200^0^0^^{InputCheck:matrikelnummern}^^
46003^Geschlecht^13^0^0^170^100^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM kenn_geschl order by 2^^^
46005^bis Fachsemester^20^0^0^170^20^1^integer^30^0^0^^hidden^^
46006^Staatsangehörigkeit^11^0^0^170^120^1^sql^30^0^1^<<SQL>> select '!=0','Alle ohne Deutschland' from xdummy union select '=0','Deutsch' from xdummy order by 2;^^^
46011^Status^12^0^0^170^200^1^sql^30^0^1^<<SQL>> select apnr,eintrag from kenn_status order by 2^hidden^^
46013^ab Fachsemester^19^0^0^170^20^1^integer^30^0^0^^hidden^^
46014^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('xy') order by 2^^^
46000^Fächer^4^0^0^170^200^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='KENN-Fächer-Sicht' order by sortnr,name;^ ^ ^
46001^Seit Semester^2^0^0^170^150^1^integer^30^0^1^<<SQL>> select tid, druck from kenn_semester order by tid DESC;^ ^<<SQL>> select tid,druck from kenn_semester where today() between sem_beginn and sem_ende;^
46002^Registriernummer^100^350^-1^150^180^1^integer^200^0^0^^{InputCheck:matrikelnummern}^ ^
46003^Geschlecht^13^0^0^170^100^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM kenn_geschl order by 2^ ^ ^
46004^Person-ID^110^350^-1^150^180^1^integer^200^0^0^^{InputCheck:matrikelnummern}^ ^
46005^bis Fachsemester^20^0^0^170^20^1^integer^30^0^0^^hidden^ ^
46006^Staatsangehörigkeit^11^0^0^170^120^1^sql^30^0^1^<<SQL>> select '!=0','Alle ohne Deutschland' from xdummy union select '=0','Deutsch' from xdummy order by 2;^ ^ ^
46011^Status^12^0^0^170^200^1^sql^30^0^1^<<SQL>> select apnr,eintrag from kenn_status order by 2^hidden^ ^
46013^ab Fachsemester^19^0^0^170^20^1^integer^30^0^0^^hidden^ ^
46014^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('xy') order by 2^ ^ ^
46015^Felder^125^0^0^150^190^10^char^2550^0^1^<<SQL>> select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F, sx_tables T where F.table_name=T.name and F.currentlyused=1 and (F.table_name ='promstat_docprogram_aggr' /* or F.table_name in (<<Weitere Tabellen>>) */)\
order by 2;^^^
46016^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^
46017^Bis Semester^3^0^0^170^150^1^integer^30^0^1^<<SQL>> select tid, druck from kenn_semester order by tid DESC;^^<<SQL>> select tid,druck from kenn_semester where today() between sem_beginn and sem_ende;^
46018^tablestylesheet^120^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=46000^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=46000 and S.ord=1^
46019^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^
order by 2;^ ^ ^
46016^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^ ^<<SQL>> select 1,'Ja' from xdummy^
46017^Bis Semester^3^0^0^170^150^1^integer^30^0^1^<<SQL>> select tid, druck from kenn_semester order by tid DESC;^ ^<<SQL>> select tid,druck from kenn_semester where today() between sem_beginn and sem_ende;^
46018^tablestylesheet^120^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=46000^ ^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=46000 and S.ord=1^
46019^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^ ^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^

1
src-modules/module/promstat/masken/46000_masken_felder_bez.unl

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
46000^46001^
46000^46002^
46000^46003^
46000^46004^
46000^46005^
46000^46006^
46000^46011^

10
src-modules/module/promstat/masken/46000_maskeninfo.unl

@ -67,12 +67,14 @@ SELECT name,\ @@ -67,12 +67,14 @@ SELECT name,\
/* and kz_fach = <<Fachkennz.>> */\
/* and promstat_docprogram_aggr.his_person_id in (select P.his_person_id from prom_promovierende P where P.geschlecht_astat = <<Geschlecht>>) */\
/* and kz_rueck_beur_ein in(<<Status>>) */\
/* and promstat_docprogram_aggr.his_person_id in (select P.his_person_id from prom_promovierende P where P.staatsangehoerigkeit_1_astat <<Staatsangehörigkeit>>) */\
/* and promstat_docprogram_aggr.his_person_id in (select P.his_person_id from prom_promovierende P where P.registrationnumber= <<Registriernummer>>) */\
/* and promstat_docprogram_aggr.person_id in (select P.his_person_id from prom_promovierende P where P.staatsangehoerigkeit_1_astat <<Staatsangehörigkeit>>) */\
/* and promstat_docprogram_aggr.person_id in (select P.his_person_id from prom_promovierende P where P.registrationnumber= <<Registriernummer>>) */\
/* and promstat_docprogram_aggr.person_id = <<Person-ID>> */\
\
" />\
\
/* \
<#assign filter = filter + " and (promstat_docprogram_aggr.astat_bund in "+Fächer.allNeededKeysList /> --<<Fächer>> */\
<#assign filter = filter + " and (promstat_docprogram_aggr.astat_bund in "+Fächer.allNeededKeysList +")" /> --<<Fächer>> */\
\
\
\
@ -119,4 +121,4 @@ Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlü @@ -119,4 +121,4 @@ Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlü
</#if>\
</#foreach>\
</#if>\
@@@^Studienfach^Anzahl bzw. Anteil^Statistik der Promotionsvorhaben und Merkmalen der Promivierenden HZB früheres Studium^drop table tmp_tabelle;^studallg.dat^1^850^600^0^1^<<SQL>> select 'Letzte Lieferung: ' || date_str(max(datum)) from kenn_lieferung where (1 =0 /* or hs_nr::char(10) in (<<Hochschule>>) */ /* or hs_nr::char(10) in (select key_apnr from organigramm where parent in (<<Hochschule>>)) */ /* or <<Hochschule>>='0' */ ) and kennzahl ='STDI'^
@@@^Studienfach^Anzahl bzw. Anteil^Statistik der Promotionsvorhaben und Merkmalen der Promivierenden HZB früheres Studium^drop table tmp_tabelle;^^1^850^600^^1^<<SQL>> select 'Letzte Lieferung: ' || date_str(max(datum)) from kenn_lieferung where (1 =0 /* or hs_nr::char(10) in (<<Hochschule>>) */ /* or hs_nr::char(10) in (select key_apnr from organigramm where parent in (<<Hochschule>>)) */ /* or <<Hochschule>>='0' */ ) and kennzahl ='STDI'^

Loading…
Cancel
Save