Index: PRBSH.mac.rou =================================================================== diff -u -r29059 -r52985 --- PRBSH.mac.rou (.../PRBSH.mac.rou) (revision 29059) +++ PRBSH.mac.rou (.../PRBSH.mac.rou) (revision 52985) @@ -1,3 +1,18 @@ +VerwijderOude(AantalMaandenBehouden) + Set:'$G(AantalMaandenBehouden) AantalMaandenBehouden=6 + Set TotDatum=$$CALCDATE^vhLib.DataTypes($H,"M",-AantalMaandenBehouden) + + For BSNode="BS","BSS" Do + . Set PRNr="" + . For Set PRNr=$O(^PRBSH(BSNode,PRNr)) Quit:PRNr="" Do + . . W ! + . . Set Datum="" + . . For Set Datum=$O(^PRBSH(BSNode,PRNr,Datum)) Quit:Datum=""||(+Datum>TotDatum) Do + . . . Write PRNr," ",$zdt(Datum,3),! + . . . Kill ^PRBSH(BSNode,PRNr,Datum) + + Quit + DispHisto(MPRNr) New BSNode,Selected Set BSNode=$S($G(NoSa)="S":"BSS",1:"BS") @@ -88,3 +103,4 @@ } Quit +