First Comment |
ORIEN - IEN of consult from File 123 ORERR - return array for results/errors ORCOM is the comments array to be added passed in as ORCOM(1)="Xxxx Xxxxx...",ORCOM(2)="Xxxx Xx Xxx...", ORCOM(3)="Xxxxx Xxx Xx...", etc. ORALRT - should alerts be sent to anyone? ORALTO - array of alert recipient IENs
|
Code |
N ORAD,ORDUZ,ORNP,X S ORERR=0,ORAD=$S($D(ORDATE):ORDATE,1:$$NOW^XLFDT),ORNP="" I '$D(ORCOM) S ORERR="1^Comments required - no action taken" Q I '$D(^GMR(123,ORIEN)) S ORERR="1^No such consult" Q I $G(ORALRT)=1 D .F I=1:1 S X=$P(ORALTO,";",I) Q:X="" S ORDUZ(X)="" D CMT^GMRCGUIB(ORIEN,.ORCOM,.ORDUZ,ORAD,DUZ)
|