First Comment |
Output array (Required) RESULT(1)= -1-RPC/API failed Required variable not defined 0-No display/action required Not accessing own, employee, or sensitive record 1-Display warning message Sensitive and DG SENSITIVITY key holder or Employee and DG SECURITY OFFICER key holder 2-Display warning message/require OK to continue Sensitive and not a DG SENSITIVITY key holder Employee and not a DG SECURITY OFFICER key holder 3-Access to record denied Accessing own record 4-Access to Patient (#2) file records denied SSN not defined RESULT(2-10) = error or display messages
Input parameters: DFN = Patient file entry (Required) DGMSG = If 1, generate message (optional) DGOPT = Option name^Menu text (Optional)
|
Code |
K RESULT I $G(DFN)="" D Q .S RESULT(1)=-1 .S RESULT(2)="Required variable missing." S DGMSG=$G(DGMSG) D OWNREC(.RESULT,DFN,$G(DUZ),DGMSG) I RESULT(1)=1 S RESULT(1)=3 Q I RESULT(1)=2 S RESULT(1)=4 Q K RESULT D SENS(.RESULT,DFN,$G(DUZ)) I RESULT(1)=1 D .I $G(DUZ)="" D Q ..;DUZ must be defined to access sensitive record & update DG Security log ..S RESULT(1)=-1 ..S RESULT(2)="Your user code is undefined. This must be defined to access a restricted patient record." .D SETLOG1^DGSEC(DFN,DUZ,,$G(DGOPT))
|