- KMPPS44B ;SP/JML - KMP*4*4 POST INSTALL ROUTINE ;11/1/2023
- ;;4.0;CAPACITY MANAGEMENT;**4**;3/1/2018;Build 36
- ;
- ;
- ;
- GETCONFIGP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetConfigPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetConfig"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" D CPF^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" D MON^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetConfigPHandler"")")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- ;
- SETCONFIGP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP SetConfigPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""SetConfig"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" S KMPRET.ResultText=$$SETCFG^KMPUTLW2(KMPREQ)")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" D CPF^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" D MON^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP SetConfigPHandler"")")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- ;
- GETERRORP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetErrorPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetError"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D GETERR^KMPUTLW2(KMPRET,KMPREQ)")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetErrorPHandler"")")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- ;
- GETCTMLOGP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetCtmLogPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetCtmLog"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" D CTMLOG^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetCtmLogPHandler"")")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- ;
- GETPATLISTP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPatientListPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetPatientList"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" D PATLIST^KMPSYNTH(KMPRET,KMPREQ.Count)")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPatientListPHandler"")")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- ;
- RETRYP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP RetryPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""Retry"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" S KMPRET.ResultText=$$RETRY^KMPUTLW(KMPREQ)")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP RetryPHandler"")")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- ;
- GETPACKAGESP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPackagesPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetPackages"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" D PACKAGES^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPackagesPHandler"")")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- ;
- GETHTTPP(MDEF) ;
- D MDEF.Implementation.WriteLine(" TRY {")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetHttpMetricsPEvent"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- D MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- D MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- D MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""HttpMetrics"" D Return $$$OK")
- D MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- D MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- D MDEF.Implementation.WriteLine(" S KMPMCHK=KMPREQ.Montype")
- D MDEF.Implementation.WriteLine(" I KMPMCHK="""" S KMPMCHK=""ALL""")
- D MDEF.Implementation.WriteLine(" S KMPDATE=KMPREQ.Date")
- D MDEF.Implementation.WriteLine(" ; parse odbc date format into fileman data format")
- D MDEF.Implementation.WriteLine(" S KMPDCHK=""3""_$E(KMPDATE,3,4)_$P(KMPDATE,""-"",2)_$P(KMPDATE,""-"",3)")
- D MDEF.Implementation.WriteLine(" S KMPRET.Date=KMPDATE")
- D MDEF.Implementation.WriteLine(" S KMPMLIST=##class(%DynamicArray).%New()")
- D MDEF.Implementation.WriteLine(" S KMPSUB=""KMP""")
- D MDEF.Implementation.WriteLine(" F S KMPSUB=$O(^XTMP(KMPSUB)) Q:$E(KMPSUB,1,3)'=""KMP"" D")
- D MDEF.Implementation.WriteLine(" .S KMPDAY=$P(KMPSUB,"" "",2)")
- D MDEF.Implementation.WriteLine(" .Q:KMPDCHK'=KMPDAY")
- D MDEF.Implementation.WriteLine(" .S KMPMTYP=0")
- D MDEF.Implementation.WriteLine(" .F S KMPMTYP=$O(^XTMP(KMPSUB,KMPMTYP)) Q:KMPMTYP="""" D")
- D MDEF.Implementation.WriteLine(" ..Q:(KMPMCHK'[KMPMTYP)&&(KMPMCHK'=""ALL"")")
- D MDEF.Implementation.WriteLine(" ..S KMPMOBJ=##class(%DynamicObject).%New()")
- D MDEF.Implementation.WriteLine(" ..S KMPMOBJ.Monitor=KMPMTYP")
- D MDEF.Implementation.WriteLine(" ..S KMPDARR=##class(%DynamicArray).%New()")
- D MDEF.Implementation.WriteLine(" ..S KMPNODE=""""")
- D MDEF.Implementation.WriteLine(" ..F S KMPNODE=$O(^XTMP(KMPSUB,KMPMTYP,""HTTP"",KMPNODE)) Q:KMPNODE="""" D")
- D MDEF.Implementation.WriteLine(" ...S KMPT=""""")
- D MDEF.Implementation.WriteLine(" ...F S KMPT=$O(^XTMP(KMPSUB,KMPMTYP,""HTTP"",KMPNODE,KMPT)) Q:KMPT="""" D")
- D MDEF.Implementation.WriteLine(" ....S KMPTIME=$ZT(KMPT)")
- D MDEF.Implementation.WriteLine(" ....S KMPDATA=^XTMP(KMPSUB,KMPMTYP,""HTTP"",KMPNODE,KMPT)")
- D MDEF.Implementation.WriteLine(" ....S KMPDATA=KMPTIME_""^""_KMPNODE_""^""_KMPDATA")
- D MDEF.Implementation.WriteLine(" ....D KMPDARR.%Push(KMPDATA)")
- D MDEF.Implementation.WriteLine(" ..S KMPMOBJ.Data=KMPDARR")
- D MDEF.Implementation.WriteLine(" ..D KMPMLIST.%Push(KMPMOBJ)")
- D MDEF.Implementation.WriteLine(" S KMPRET.Monitors=KMPMLIST")
- D MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- D MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- D MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- D MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetHttpMetricsPHandler"")")
- D MDEF.Implementation.WriteLine(" Return $$$OK")
- D MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- D MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- D MDEF.Implementation.WriteLine(" }")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HKMPPS44B 14412 printed Feb 18, 2025@23:07:54 Page 2
- KMPPS44B ;SP/JML - KMP*4*4 POST INSTALL ROUTINE ;11/1/2023
- +1 ;;4.0;CAPACITY MANAGEMENT;**4**;3/1/2018;Build 36
- +2 ;
- +3 ;
- +4 ;
- GETCONFIGP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetConfigPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetConfig"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +11 DO MDEF.Implementation.WriteLine(" D CPF^KMPUTLW(KMPRET)")
- +12 DO MDEF.Implementation.WriteLine(" D MON^KMPUTLW(KMPRET)")
- +13 DO MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- +14 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +15 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +16 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetConfigPHandler"")")
- +17 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +18 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +19 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +20 DO MDEF.Implementation.WriteLine(" }")
- +21 QUIT
- +22 ;
- SETCONFIGP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP SetConfigPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""SetConfig"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" S KMPRET.ResultText=$$SETCFG^KMPUTLW2(KMPREQ)")
- +11 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +12 DO MDEF.Implementation.WriteLine(" D CPF^KMPUTLW(KMPRET)")
- +13 DO MDEF.Implementation.WriteLine(" D MON^KMPUTLW(KMPRET)")
- +14 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +15 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP SetConfigPHandler"")")
- +16 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +17 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +18 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +19 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +20 DO MDEF.Implementation.WriteLine(" }")
- +21 QUIT
- +22 ;
- GETERRORP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetErrorPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetError"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" D GETERR^KMPUTLW2(KMPRET,KMPREQ)")
- +11 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +12 DO MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- +13 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +14 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +15 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetErrorPHandler"")")
- +16 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +17 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +18 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +19 DO MDEF.Implementation.WriteLine(" }")
- +20 QUIT
- +21 ;
- GETCTMLOGP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetCtmLogPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetCtmLog"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +11 DO MDEF.Implementation.WriteLine(" D CTMLOG^KMPUTLW(KMPRET)")
- +12 DO MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- +13 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +14 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +15 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetCtmLogPHandler"")")
- +16 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +17 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +18 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +19 DO MDEF.Implementation.WriteLine(" }")
- +20 QUIT
- +21 ;
- GETPATLISTP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPatientListPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetPatientList"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +11 DO MDEF.Implementation.WriteLine(" D PATLIST^KMPSYNTH(KMPRET,KMPREQ.Count)")
- +12 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +13 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +14 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPatientListPHandler"")")
- +15 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +16 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +17 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +18 DO MDEF.Implementation.WriteLine(" }")
- +19 QUIT
- +20 ;
- RETRYP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP RetryPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""Retry"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" S KMPRET.ResultText=$$RETRY^KMPUTLW(KMPREQ)")
- +11 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +12 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +13 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +14 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP RetryPHandler"")")
- +15 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +16 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +17 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +18 DO MDEF.Implementation.WriteLine(" }")
- +19 QUIT
- +20 ;
- GETPACKAGESP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPackagesPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""GetPackages"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +11 DO MDEF.Implementation.WriteLine(" D PACKAGES^KMPUTLW(KMPRET)")
- +12 DO MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- +13 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +14 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +15 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetPackagesPHandler"")")
- +16 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +17 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +18 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +19 DO MDEF.Implementation.WriteLine(" }")
- +20 QUIT
- +21 ;
- GETHTTPP(MDEF) ;
- +1 DO MDEF.Implementation.WriteLine(" TRY {")
- +2 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetHttpMetricsPEvent"")")
- +3 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Access-Control-Allow-Origin"",""*"")")
- +4 DO MDEF.Implementation.WriteLine(" Do %response.SetHeader(""Allow"",""HEAD,GET,POST,PUT,DELETE,OPTIONS"")")
- +5 DO MDEF.Implementation.WriteLine(" S KMPRET=##class(%DynamicObject).%New()")
- +6 DO MDEF.Implementation.WriteLine(" S KMPREQ=##class(%DynamicAbstractObject).%FromJSON(%request.Content)")
- +7 DO MDEF.Implementation.WriteLine(" I KMPREQ.Function'=""HttpMetrics"" D Return $$$OK")
- +8 DO MDEF.Implementation.WriteLine(" .S KMPRET.ResultText=""Incorrect Function Type""")
- +9 DO MDEF.Implementation.WriteLine(" .W KMPRET.%ToJSON()")
- +10 DO MDEF.Implementation.WriteLine(" D SITE^KMPUTLW(KMPRET)")
- +11 DO MDEF.Implementation.WriteLine(" S KMPMCHK=KMPREQ.Montype")
- +12 DO MDEF.Implementation.WriteLine(" I KMPMCHK="""" S KMPMCHK=""ALL""")
- +13 DO MDEF.Implementation.WriteLine(" S KMPDATE=KMPREQ.Date")
- +14 DO MDEF.Implementation.WriteLine(" ; parse odbc date format into fileman data format")
- +15 DO MDEF.Implementation.WriteLine(" S KMPDCHK=""3""_$E(KMPDATE,3,4)_$P(KMPDATE,""-"",2)_$P(KMPDATE,""-"",3)")
- +16 DO MDEF.Implementation.WriteLine(" S KMPRET.Date=KMPDATE")
- +17 DO MDEF.Implementation.WriteLine(" S KMPMLIST=##class(%DynamicArray).%New()")
- +18 DO MDEF.Implementation.WriteLine(" S KMPSUB=""KMP""")
- +19 DO MDEF.Implementation.WriteLine(" F S KMPSUB=$O(^XTMP(KMPSUB)) Q:$E(KMPSUB,1,3)'=""KMP"" D")
- +20 DO MDEF.Implementation.WriteLine(" .S KMPDAY=$P(KMPSUB,"" "",2)")
- +21 DO MDEF.Implementation.WriteLine(" .Q:KMPDCHK'=KMPDAY")
- +22 DO MDEF.Implementation.WriteLine(" .S KMPMTYP=0")
- +23 DO MDEF.Implementation.WriteLine(" .F S KMPMTYP=$O(^XTMP(KMPSUB,KMPMTYP)) Q:KMPMTYP="""" D")
- +24 DO MDEF.Implementation.WriteLine(" ..Q:(KMPMCHK'[KMPMTYP)&&(KMPMCHK'=""ALL"")")
- +25 DO MDEF.Implementation.WriteLine(" ..S KMPMOBJ=##class(%DynamicObject).%New()")
- +26 DO MDEF.Implementation.WriteLine(" ..S KMPMOBJ.Monitor=KMPMTYP")
- +27 DO MDEF.Implementation.WriteLine(" ..S KMPDARR=##class(%DynamicArray).%New()")
- +28 DO MDEF.Implementation.WriteLine(" ..S KMPNODE=""""")
- +29 DO MDEF.Implementation.WriteLine(" ..F S KMPNODE=$O(^XTMP(KMPSUB,KMPMTYP,""HTTP"",KMPNODE)) Q:KMPNODE="""" D")
- +30 DO MDEF.Implementation.WriteLine(" ...S KMPT=""""")
- +31 DO MDEF.Implementation.WriteLine(" ...F S KMPT=$O(^XTMP(KMPSUB,KMPMTYP,""HTTP"",KMPNODE,KMPT)) Q:KMPT="""" D")
- +32 DO MDEF.Implementation.WriteLine(" ....S KMPTIME=$ZT(KMPT)")
- +33 DO MDEF.Implementation.WriteLine(" ....S KMPDATA=^XTMP(KMPSUB,KMPMTYP,""HTTP"",KMPNODE,KMPT)")
- +34 DO MDEF.Implementation.WriteLine(" ....S KMPDATA=KMPTIME_""^""_KMPNODE_""^""_KMPDATA")
- +35 DO MDEF.Implementation.WriteLine(" ....D KMPDARR.%Push(KMPDATA)")
- +36 DO MDEF.Implementation.WriteLine(" ..S KMPMOBJ.Data=KMPDARR")
- +37 DO MDEF.Implementation.WriteLine(" ..D KMPMLIST.%Push(KMPMOBJ)")
- +38 DO MDEF.Implementation.WriteLine(" S KMPRET.Monitors=KMPMLIST")
- +39 DO MDEF.Implementation.WriteLine(" S KMPRET.Function=KMPREQ.Function")
- +40 DO MDEF.Implementation.WriteLine(" S KMPRET.ResultText=""OK""")
- +41 DO MDEF.Implementation.WriteLine(" W KMPRET.%ToJSON()")
- +42 DO MDEF.Implementation.WriteLine(" D RU^%ZOSVKR(""KMP GetHttpMetricsPHandler"")")
- +43 DO MDEF.Implementation.WriteLine(" Return $$$OK")
- +44 DO MDEF.Implementation.WriteLine(" } CATCH KMPERR {")
- +45 DO MDEF.Implementation.WriteLine(" Return ..Http500(KMPERR)")
- +46 DO MDEF.Implementation.WriteLine(" }")
- +47 QUIT