Автоматизированное рабочее место оператора автоматизированного переговорного пункта и информационной системы
Рефераты >> Программирование и компьютеры >> Автоматизированное рабочее место оператора автоматизированного переговорного пункта и информационной системы

ПРИЛОЖЕНИЕ 3

Текст программы монитора АПП-РК

iapbckg

 

iapbckg(%an)

;IAKoff;03:44 PM 6 Mar 1996

 

n %cc,%free,%zone,%cmd,%i,%summ,%tsec,%tmin,%min,%hour,%sec,%cod,%idev

 

n %cabspis,%to,%hl,%SHARE,%noper,%nsmen

 

s %SHARE=$$SHARE^AppSyst()

 

s $zp=$c(30) s $ztrap="errhndr^iapbckgsub"

 

s ^appstat("CMD")="WAIT"

 

s ^appstat("STATUS")="INIT"

 

o %an u %an:(ixxlate=0:speed=2400:parity="none":stopbits=1)

 

d addjrn^iapbckgsub("APPRK","Запуск Апп монитор","")

 

w "E*"

 

k ^appzxcab

 

k ^appcab

 

f %i=1:1:32 d

 

. s ^appcab(%i)="-1"_$zp_"0"_$zp_"00.00"_$zp_"00.00"_$zp_""_$zp

 

. s ^appcab(%i)=^appcab(%i)_"00.00"_$zp_""_$zp_"0"_$zp_"0"_$zp

 

. s ^appcab(%i)=^appcab(%i)_"0"_$zp_"0"_$zp_"0"_$zp_"00.00"_$zp

 

. s ^appcab(%i)=^appcab(%i)_"-1"_$zp_"0"

 

. w "O"_%i_"*"

 

. f %zone=0:1:20 s ^appcab(%i,%zone)="0"_$zp_"0"

 

. f %zone=128:1:148 s ^appcab(%i,%zone)="0"_$zp_"0"

   
 

s %ws=0

freecab

; получить список кабин

 

s %ws=%ws+1

 

i %ws=20 g thlt

 

s ^appstat("STATUS")="CAB OFF"

 

w "I*"

 

s ^appstat("STATUS")="LIST"

 

w "S*"

 

s %free=$$gres^iapbckgsub() i %free="HALT" g thlt

 

i %free="TIME" g thlt

 

s %i=1

ncab

 
 

s %cmd=$p(%free," ",%i+1)

 

s %cc=$e(%cmd,1,2)+0

 

s %cod=$e(%cmd,3,3)

 

i %cmd="" g lastcab

 

i (%cc>32)!(%cc<1) d addjrn^iapbckgsub("APPRK","InitError Cab",%free) g freecab

 

i (%cod'="A")&(%cod'="P") d addjrn^iapbckgsub("APPRK","InitError Stat",%free) g freecab

   
 

s %cabspis(%i)=%cc

 

s ^appcab(%cc).1=0

 

s ^appcab(%cc).2=2 i %cod="A" s ^appcab(%cc).2=1

 

s %i=%i+1

 

g ncab

lastcab

 
 

; ---------------------------

 

; Загрузка системных установок

 

s ^appstat("STATUS")="SETUP"

 

w "P"_^appstat("SETUP")_"*"

 

; ---------------------------

 

; Загрузка тарифов по СНГ

LoadTarif

 
 

s ^appstat("STATUS")="TARIF"

 

i $d(^appstat("TARIF","AUTO8"))=0 g nosngtarif

 

s %zone="" s %cmd=""

nx1tarif

 
 

s %zone=$o(^appstat("TARIF","AUTO8",%zone))

 

i %zone="" g ldtarif1

 

s %sec=$p(^appstat("TARIF","AUTO8",%zone),$c(30),%SHARE+1)

 

i %sec<20 s %sec=%sec*^AppSys58("USD_KURS")

 

s %cmd=%cmd_$$dec2hex^iapbckgsub(%sec) g nx1tarif

ldtarif1

 
 

w "L"_$c($l(%cmd))_$c(0)_%cmd_"*"

 

; Загрузка международных тарифов

nosngtarif

 
 

i $d(^appstat("TARIF","AUTO810"))=0 g nofgrtarif

 

s %zone="" s %cmd=""

nx2tarif

 
 

s %zone=$o(^appstat("TARIF","AUTO810",%zone))

 

i %zone="" g ldtarif2

 

s %sec=$p(^appstat("TARIF","AUTO810",%zone),$c(30),%SHARE+1)

 

i %sec<20 s %sec=%sec*^AppSys58("USD_KURS")

 

s %cmd=%cmd_$$dec2hex^iapbckgsub(%sec) g nx2tarif

ldtarif2

 
 

w "L"_$c($l(%cmd))_$c(255)_%cmd_"*"

nofgrtarif

 
 

s ^appstat("CMD")="R"

 

s %to=0

mainloop

 
 

i %SHARE'=$$SHARE^AppSyst() s %SHARE=$$SHARE^AppSyst() g LoadTarif

 

s ^appstat("STATUS")="GET"

 

s %free=$$gres^iapbckgsub()

 

s ^appstat("STATUS")="SEL"

 

i %free="HALT" g thlt

 

i %free="TIME" g inerror

 

i $$instat^iapbckgsub($p(%free," ",1))="B" s %to=0 g talkbeg

 

i $$instat^iapbckgsub($p(%free," ",1))="E" s %to=0 g talkend

 

i $$instat^iapbckgsub($p(%free," ",1))="L" g life

 

d addjrn^iapbckgsub("APPRK","Unknown command",%free)

 

g mainloop

   

life

 
 

s %to=%to+1

 

s ^appstat("STATUS")="L"

 

s %i=1

lf1

 
 

s %cmd=$p(%free," ",%i+1)

 

i %cmd="" g lf3

 

s %cod=$e(%cmd,3,4)+0

 

i $d(%cabspis(%i))=0 d addjrn^iapbckgsub("APPRK","Unknown Life",%free) g mainloop

 

s %cc=%cabspis(%i)

 

s ^appcab(%cc).15=%cod ; номер автомата

 

i ^appcab(%cc).2=1 g lfa

 

; Ручная кабина

 

i $e(%cmd,1,1)="B" s ^appcab(%cc).1=1 s %to=0 g lf2

 

i ($e(%cmd,1,1))="F" w "B"_%cc_"*" d addjrn^iapbckgsub("C"_%cc,"ON")

 

; РУЧНЫЕ КАБИНЫ ВСЕГДА ВКЛЮЧЕНЫ

 

i ($e(%cmd,1,1)="F")&(^appcab(%cc).1=0) s ^appcab(%cc).1=0 g lf2

 

i ($e(%cmd,1,1)="F")&(^appcab(%cc).1=1) s ^appcab(%cc).1=2 g lf2

 

d addjrn^iapbckgsub("APPRK","US Cab"_%cc,%cmd) g lf2

lfa

; Автоматическая кабина

 

i (^appcab(%cc).1'=0)!($e(%cmd,1,1)'="F") s %to=0

 

i (^appcab(%cc).1=0)&($e(%cmd,1,1)="B") s ^appcab(%cc).1=1 g lf2

 

i (^appcab(%cc).1=0)&($e(%cmd,1,1)="F") s ^appcab(%cc).1=0 g lf2

 

i (^appcab(%cc).1=1)&($e(%cmd,1,1)="B") s ^appcab(%cc).1=1 g lf2

 

i (^appcab(%cc).1=1)&($e(%cmd,1,1)="F") s ^appcab(%cc).1=2 g lf2

 

i (^appcab(%cc).1=2)&($e(%cmd,1,1)="B") s ^appcab(%cc).1=1 g lf2

 

i (^appcab(%cc).1=2)&($e(%cmd,1,1)="F") s ^appcab(%cc).1=2 g lf2

 

i (^appcab(%cc).1=3)&($e(%cmd,1,1)="B") s ^appcab(%cc).1=3 g lf2

 

i (^appcab(%cc).1=3)&($e(%cmd,1,1)="F") s ^appcab(%cc).1=0 g lf2

 

i (^appcab(%cc).1=4)&($e(%cmd,1,1)="B") s ^appcab(%cc).1=1 g lf2

 

i (^appcab(%cc).1=4)&($e(%cmd,1,1)="F") s ^appcab(%cc).1=4 g lf2

 

i (^appcab(%cc).1=-1)&($e(%cmd,1,1)="B") s ^appcab(%cc).1=1 g lf2

 

i (^appcab(%cc).1=-1)&($e(%cmd,1,1)="F") s ^appcab(%cc).1=0 g lf2

 

d addjrn^iapbckgsub("APPRK","USS Cab"_%cc,$p(^appcab(%cc),$zp,1)_%cmd)

lf2

 
 

s %i=%i+1

 

g lf1

lf3

 
 

i %to>50 g timeout

 

g mainloop

   

talkbeg

 
 

s ^appstat("STATUS")="TB"

 

s %cc=$j($p(%free," ",2),1,0)

 

i (%cc>32)!(%cc<1) d addjrn^iapbckgsub("C99","Шо це таке ?",%free) g mainloop

 

s %i=$j($p(%free," ",5),1,0)

 

s ^appcab(%cc).6=$p(%free," ",4)

 

i $p(^appcab(%cc),$c(30),2)=2 g tbegrk

 

s %tsec=$p(%free," ",6)

 

s ^appcab(%cc).5=$e(%tsec,4,$l(%tsec)) s ^appcab(%cc).7=$e(%tsec,1,3)

tbegrk

 
 

s ^appcab(%cc).1=1

 

s %tsec=$p($h,",",2) ;---системное время в секундах

 

s ^appcab(%cc).14=%tsec ; фиксируем время начала разговора

 

d addjrn^iapbckgsub("C"_%cc,%free)

 

g mainloop

   

talkend

 
 

s ^appstat("STATUS")="TE"

 

s %cc=$j($p(%free," ",2),1,0)

 

i (%cc>32)!(%cc<1) d addjrn^iapbckgsub("C99","Шо це таке ?",%free) g mainloop

 

s ^appcab(%cc).14=-1

 

i $p(^appcab(%cc),$c(30),2)=1 g acabin

 

s ^appcab(%cc).4=$p(%free," ",3)

 

s ^appcab(%cc).1=2

 

g mainloop

acabin

 
 

s %zone=$j($p(%free," ",6),1,0)

 

s %summ=$zzoo($p(%free," ",4))

 

s ^appcab(%cc).4=$p(^appcab(%cc),$zp,4)-%summ

 

s ^appcab(%cc).8=^appcab(%cc).8+1

 

s ^appcab(%cc).9=^appcab(%cc).9+1

 

s ^appcab(%cc).10=^appcab(%cc).10+%summ

 

s ^appcab(%cc).11=%summ

 

s ^appcab(%cc).12=^appcab(%cc).12+%summ

 

s ^appcab(%cc).13=$p(%free," ",3)

 

i ($p(%free," ",5)+0)=0 s ^appcab(%cc).1=0

 

d AFTERTE

 

s ^appcab(%cc).14=-1

 

d addjrn^iapbckgsub("C"_%cc,%free)

 

g mainloop

; ------------------------------------

 

inerror

 
 

d addjrn^iapbckgsub("APPRK","Авария АПП-РК.")

 

s %i=1

ie1

 
 

i $d(%cabspis(%i))=0 g ie2

 

s %cc=%cabspis(%i)

 

i ^appcab(%cc).1=-1 g ie3

 

i ^appcab(%cc).1=0 g ie3

 

i ^appcab(%cc).1=2 g ie3

 

i ^appcab(%cc).14=-1 s ^appcab(%cc).1=2 g ie3

   
 

s %tsec=$p($h,",",2)-$p(^appcab(%cc),$zp,14)

 

s %tmin=%tsec\60 s %sec=$tr($j(%tsec#60,2)," ",0)

 

s %min=$e(%tmin#60+100,2,3)

 

s %tmin=%min+1

 

i $p(^appcab(%cc),$c(30),2)=1 g ieac

 

s ^appcab(%cc).4=$j(%min,2)_"."_$j(%sec,2)

 

s ^appcab(%cc).1=0

 

s ^appcab(%cc).14=-1

 

d htalkend^iapbckgsub(%cc)

 

s %i=%i+1

 

g ie1

ieac

 
 

s %zone=3

 

s %summ=$p(^appcab(%cc),$zp,4)

 

i (%tmin*$p(^appcab(%cc),$zp,6))>$p(^appcab(%cc),$zp,4) g aie1

 

s %summ=$zzoo($p(^appcab(%cc),$zp,6)*%tmin)

aie1

 
 

s ^appcab(%cc).4=$p(^appcab(%cc),$zp,4)-%summ

 

s ^appcab(%cc).8=^appcab(%cc).8+1

 

s ^appcab(%cc).9=^appcab(%cc).9+1

 

s ^appcab(%cc).10=^appcab(%cc).10+%summ

 

s ^appcab(%cc).11=%summ

 

s ^appcab(%cc).12=^appcab(%cc).12+%summ

 

s ^appcab(%cc).13=$j(%min,2)_"."_$j(%sec,2)

 

s ^appcab(%cc).1=2

 

i ^appcab(%cc).4=0 s ^appcab(%cc).1=0

 

d addjrn^iapbckgsub("C"_%cc,"AAA "_%cc_" "_$p(^appcab(%cc),$zp,13)_" "_%summ_" "_$p(^appcab(%cc),$zp,4)_" UNKNOWN")

 

d AFTERTE

 

s ^appcab(%cc).14=-1

ie3

 
 

s %i=%i+1

 

g ie1

ie2

 
 

s ^appstat("STATUS")="A"

 

g thlt1

 

; ------------------------------------

timeout

 
 

d addjrn^iapbckgsub("APPRK","Монитор остановлен.","Timeout")

 

s ^appstat("STATUS")="H"

 

; ------------------------------------

thlt

 
 

d addjrn^iapbckgsub("APPRK","Монитор остановлен.","")

 

s ^appstat("STATUS")="H"

thlt1

 
 

c %an

 

k %cc,%free,%zone,%cmd,%i,%summ,%tsec,%tmin,%min,%hour,%sec,%cod,%idev

 

q

 

; ---------------------------------- КОНЕЦ

AFTERTE

 
 

s %tsec=$p(^appcab(%cc),$c(30),14)

 

s %tmin=%tsec\60 ;---системное время в минутах

 

s %sec=$tr($j(%tsec#60,2)," ",0) ;---кол-во секунд

 

s %min=$e(%tmin#60+100,2,3) ;---кол-во минут

 

s %hour=%tmin\60+23#24+1 ;---кол-во часов

 

s %hour=$tr($j(%hour,2)," ",0)

 

; заполнение журнала ====================================

 

i %zone=0 s ^appcab(%cc).5=$p(^appcab(%cc),$zp,7)_$p(^appcab(%cc),$zp,5) s ^appcab(%cc).7="ГОР"

 

i %zone>127 s ^appcab(%cc).7=$e($p(^appcab(%cc),$zp,7),3,3)_$e($p(^appcab(%cc),$zp,5),1,2) s ^appcab(%cc).5=$e($p(^appcab(%cc),$zp,5),3,11)

 

; заполнение квитанций ==================================

 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)+1)=$zd_$zp_%hour_":"_%min_$zp_"0"_$zp_"КОД"_$zp_"ГОРОД"_$zp_"ТЕЛЕФОН"_$zp_"0000.00"

 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).3=^appcab(%cc).13

 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).4=^appcab(%cc).7

 

s %cmd=""

 

s %cod=$p(^appcab(%cc),$c(30),7)

 

i %zone>127 g COUNTRY

 

s %i=$e($p(^appcab(%cc),$c(30),5),1,3)

 

i $e(%cod,1,1)="2" s %i=$e(%cod,2,3) s %cod=^AppSys58("KOD_OBLS")

 

i $d(^app8DCAC(%cod))>0 s %cmd=$p(^app8DCAC(%cod),$c(30),2)

 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).8=$e(%cmd,1,14)

 

i $d(^app8DCAC(%cod,$e(%i,1,2)))>0 d

 

. s %cmd=^app8DCAC(%cod,$e(%i,1,2))

 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).5=$e(%cmd,1,12)

 

g cntick

COUNTRY

 
 

s %i=%cod_$p(^appcab(%cc),$c(30),5)

 

s %cmd=""

cntry1

 
 

i %i="" g cntry2

 

i $g(^appDCAC(%i))="" s %i=$e(%i,1,$l(%i)-1) g cntry1

 

s %cmd=$g(^appDCAC(%i))

cntry2

 
 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).5=$e($p(%cmd,$c(30),2),1,12)

 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).8=$e($p(%cmd,$c(30),1),1,14)

cntick

 
 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).6=^appcab(%cc).5

 

s ^appticket(%cc,$o(^appticket(%cc,""),-1)).7=^appcab(%cc).11

 

; заполнение реестра =======================================

 

s %gs=^appstat(1,"NOM_GOES") s %ms=^appstat(1,"NOM_MESS") s %dn=^appstat(1,"NOM_DENN")

 

d inreestr^iapbckgsub(%summ,%zone)

 

s %noper=^appstat(1,"NOM_OPER")

 

s %nsmen=^appstat(1,"NOM_SMEN")

 

i $d(^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"ACAB",%cc))=0 s ^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"ACAB",%cc).1=%summ_$zp_1 g after1

 

s ^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"ACAB",%cc).1=$p(^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"ACAB",%cc),$zp,1)+%summ

 

s ^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"ACAB",%cc).2=$p(^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"ACAB",%cc),$zp,2)+1

after1

 
 

i $d(^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"AZONE",%zone))=0 s ^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"AZONE",%zone).1=%summ_$zp_1 g after2

 

s ^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"AZONE",%zone).1=$p(^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"AZONE",%zone),$zp,1)+%summ

 

s ^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"AZONE",%zone).2=$p(^ReestrApp(%gs,%ms,%dn,%noper,%nsmen,"AZONE",%zone),$zp,2)+1

after2

 
 

q

   
 

; IAKoff Save, %n, 05/06/96

iapbckgsub

 

iapbckgsub

;IAKoff;09:47 PM 28 Feb 1996

 

q

instat(%s)

 
 

n %res

 

i $l(%s)>3 s %res="?" g ins1

 

i ($l(%s)<2) g ins2

 

i ($e(%s,1,1)=$e(%s,2,2)) s %res=$e(%s,2,2) g ins1

 

i ($l(%s)<3) g ins2

 

i ($e(%s,1,1)=$e(%s,3,3)) s %res=$e(%s,1,1) g ins1

 

i ($e(%s,2,2)=$e(%s,3,3)) s %res=$e(%s,2,2) g ins1

ins2

 
 

i "EBSL"[$e(%s,1,1) s %res=$e(%s,1,1) g ins1

 

i ($l(%s)<2) s %res="?" g ins1

 

i "EBSL"[$e(%s,2,2) s %res=$e(%s,2,2) g ins1

 

i "EBSL"[$e(%s,3,3) s %res=$e(%s,3,3) g ins1

 

s %res="?"

ins1

 
 

q %res

   
 

; ------------------------------------

gres()

; получить строку от АПП

 

i $$CHECK^dp58ups()="S" q "TIME"

 

n %res,%cc,%cnt

 

s %res="" s %cnt=0

nxtchr

 
 

r *%cc:1 i %cc'=-1 g getchr

 

i (^appstat("CMD")'="R")&(^appstat("CMD")'="WAIT") g ghlt

 

s %cnt=%cnt+1

 

i %cnt=10 w "V*"

 

i %cnt<20 g nxtchr

 

s %res="TIME" g gend

getchr

 
 

i $c(%cc)'="*" s %res=%res_$c(%cc) g nxtchr

 

g gend

ghlt

 
 

i ^appstat("CMD")="H" s %res="HALT" g gend

 

i $e(^appstat("CMD"),1,3)'="WRQ" g mbewac

 

s ^appstat("CMD")="WEN"_$e(^appstat("CMD"),4,4) g nxtchr

mbewac

 
 

i $e(^appstat("CMD"),1,3)'="WAC" g oprcmderr

 

w ^appstat("CMD","COM")_"*"

 

s %to=0

 

d addjrn("OPER","Приход",^appstat("CMD","COM"))

 

s %cc=$e(^appstat("CMD","COM"),2,3)+0

 

i $e(^appstat("CMD","COM"),1,1)="B" d

 

. d addjrn("C"_%cc,"ON "_$p(^appstat("CMD","COM")," ",2))

 

. i ^appcab(%cc).2=1 d

 

. . s ^appcab(%cc).3=$p(^appstat("CMD","COM")," ",2)

 

. . s ^appcab(%cc).4=$p(^appstat("CMD","COM")," ",2)

 

. . s ^appcab(%cc).6=0

 

. . s ^appcab(%cc).7=""

 

. . s ^appcab(%cc).8=0

 

. . s ^appcab(%cc).10=0

 

. . s ^appcab(%cc).11=0

 

. . s ^appcab(%cc).13=0

 

. . s ^appcab(%cc).1=1

 

. i ^appcab(%cc).2=2 d

 

. . s ^appcab(%cc).1=1

 

. . s ^appcab(%cc).3=$p(^appstat("CMD","COM")," ",2)

 

. . s ^appcab(%cc).4=""

 

. . s ^appcab(%cc).6=0

 

. . s ^appcab(%cc).7=""

 

. . s ^appcab(%cc).8=0

 

. . s ^appcab(%cc).10=0

 

. . s ^appcab(%cc).11=0

 

. . s ^appcab(%cc).13=0

 

i $e(^appstat("CMD","COM"),1,1)="O" d

 

. d addjrn("C"_%cc,"OFF "_$p(^appcab(%cc),$zp,4))

 

. s ^appcab(%cc).14=-1

 

. i ^appcab(%cc).2=1 d

 

. . s ^appcab(%cc).1=3

 

. . s ^appzxcab(%cc)=^appcab(%cc)

 

. i ^appcab(%cc).2=2 d

 

. . i ^appcab(%cc).1=1 s ^appcab(%cc).4=0 d ^iaphcabbckg(%cc)

 

. . s ^appcab(%cc).1=0

 

. . s ^appcab(%cc).5="СВОБ"

 

s ^appstat("CMD")="R"

 

w "V*" ; жизненный тик-так

 

g nxtchr

oprcmderr

 
 

d addjrn("OPER","Unknown command",^appstat("CMD"))

 

g nxtchr

gend

 
 

q %res

 

; -----------------------------------

dec2hex(%dec)

; Конвертор из десятичного числа в 5 байт для АПП

 

n %hex,%kop,%hh,%hl,%lh,%ll,%al

 

s %hh=%dec\16777216

 

s %hl=(%dec-(%hh*16777216))\65536

 

s %lh=(%dec-(%hh*16777216)-(%hl*65536))\256

 

s %ll=(%dec-(%hh*16777216)-(%hl*65536)-(%lh*256))\1

 

s %al=(%dec-(%dec\1)*100)\1

 

s %hex=$c(%al,%ll,%lh,%hl,%hh)

 

q %hex

 

; ----------------------------------

errhndr

 
 

n %ei,%iiii

 

s %ei=$zzerr

 

d addjrn("ERROR",$zename($p(%ei,",",1)),$$GetDTQ^AppSys())

 

d init^%errlog

 

g inerror^iapbckg

 

; ----------------------------------

inreestr(%increment,%z)

 
 

n %mess,%denn,%oper,%smen

 

s %mess=^appstat(1,"NOM_MESS")

 

s %denn=^appstat(1,"NOM_DENN")

 

s %oper=^appstat(1,"NOM_OPER")

 

s %smen=^appstat(1,"NOM_SMEN")

 

; ОБЩИЙ

 

l +^AppSmena

 

s ^AppSmena(%mess,%denn,%oper,%smen).6=$p(^AppSmena(%mess,%denn,%oper,%smen),$zp,6)+%increment

 

; ЧИСТО ВСЕ ПО АК

 

i %z=0 s ^AppSmena(%mess,%denn,%oper,%smen).30=$p(^AppSmena(%mess,%denn,%oper,%smen),$zp,30)+%increment g inree1

 

i %z<128 s ^AppSmena(%mess,%denn,%oper,%smen).22=$p(^AppSmena(%mess,%denn,%oper,%smen),$zp,22)+%increment g inree1

 

s ^AppSmena(%mess,%denn,%oper,%smen).29=$p(^AppSmena(%mess,%denn,%oper,%smen),$zp,29)+%increment

inree1

 
 

l -^AppSmena

 

q

 

; ------------------------------------

addjrn(%ind,%txt,%res)

 
 

n %id

 

s %id=$o(^appjrn(%ind,""),-1)+1

 

s ^appjrn(%ind,%id,"MSG")=$g(%txt)

 

s ^appjrn(%ind,%id,"RES")=$g(%res)

 

s ^appjrn(%ind,%id,"TIME")=$$GetDTQ^AppSys

 

k ^appjrn(%ind,%id-200)

 

q

 

; ----------------------------------


Страница: