Functionality INCLUDE NBAPI_ISH It locks a specific patient to prevent further processing. This lockremains active until explicit unlocking. This prevents a patient datarecord from being processed by several users at the same time. This is only necessary if you call several BAPIS that write (change orcreate) data in direct succession for the same object instance. Onlysuch a lock prevents another user from accessing the data in between.If you set a lock using BAPI_PATIENT_ENQUEUE>, you must cancelthis lock using BAPI_PATIENT_DEQUEUE> after your actions havebeen executed. If internal number assignment is used when creating a patient, it isnot necessary to call BAPI_PATIENT_ENQUEUE> (since thePATIENTID> to be locked is not known). However, calling theseobjects in this situation has no negative consequences. If aPATIENTID> is not included in the data passed, no data is locked.Example You want to create a patient master record using external numberassignment. You also want to create the risk factors for this patientwhen creating the patient master record. The correct call sequence isas follows: RESET N1 BAPI_PATIENT_ENQUEUE> BAPI_PATIENT_CREATE> BAPI_TRANSACTION_COMMIT> (with parameter WAIT> = 'X') BAPI_PATIENT_ADDRISKFACTOR> BAPI_TRANSACTION_COMMIT> (with parameter WAIT> = ' ') BAPI_PATIENT_DEQUEUE>Notes INCLUDE NBAPI_PRECOND_AUTHORITY N_PATI_AKT. INCLUDE BAPI_RET INCLUDE NBAPI_WORST_RETURNED_MSGTY INCLUDE NBAPI_PATIENTID Description Errors that occur are returned in this table. Value range The following error messages can occur:
- N1016:>,,Patient locked by
(re-try later)
- N1017:>,,Patient could not be
locked
- MC600:>,,System error occurred during lock
administration
- MC603:>,,Lock table overflow
|