First Comment |
ORERR - return array for results/errors ORIEN - IEN of consult from File 123 ORNP - Provider who Scheduled consult ORDATE - Date/Time Consult was scheduled. ORALRT - should alerts be sent to anyone? ORALTO - array of alert recipient IENs 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.
|
Code |
N ORAD,ORDUZ,X S ORERR=0,ORAD=$S($D(ORDATE):ORDATE,1:$$NOW^XLFDT) S:+$G(ORNP)=0 ORNP=DUZ 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)="" S ORERR=$$SCH^GMRCGUIB(ORIEN,ORNP,ORAD,.ORDUZ,.ORCOM)
|