SAP for Healthcare Discussions
Foster discussions about patient care, cost reduction, and operational excellence in healthcare organizations using SAP. Join the conversation.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change status of clinical order position using EXIT_SAPLN1LO_001

Former Member
0 Kudos
416

Presently using EXIT_SAPLN1LO_001 for setting the clinical order position during release of services using NWP1. The Service details are fetched through n1vkg table and object lr_cordpos for clinical order position is created.

The method set_status is not working when used for setting the staus. Object lr_cordpos is defined as

lr_cordpos TYPE REF TO cl_ishmed_prereg

any idea do we have to call any other method before setting this status.

thanks

anya

6 REPLIES 6

Former Member
0 Kudos
329

Hi,

I think there is a (static) utility class with a method designed to perform this status change (from outside the CORDER dialog), CL_ISH_UTL_CORD=>CHANGE_STATE.

Example call:


CALL METHOD cl_ish_utl_cord=>change_state
          EXPORTING
            ir_cordpos       = lr_cordpos
*            I_VKGID          =
            i_target_state   = l_target_state
            ir_environment   = lr_environment
          IMPORTING
            e_rc             = l_rc
          CHANGING
            cr_errorhandler  = p_errorhandler.

hope it helps, anton

Former Member
0 Kudos
329

Hi,

in my opinion, since you are using a preregistration object method that change the status from outside of the clinical order, may be you has to use the save method af the same class.

I think you are changing the status only in the ABAP memory, not saving it to DB.

This method works fine when calling it inside of the clinical order process screen (N1_CORDER_CHECK, N1_CORDER_PREALLOC, N1_CORDER_USER_COMM, ...), because at the end of the process, the save global method is calling all save methods of involved classes.

Best Regards

Former Member
0 Kudos
329

Hi all,

thanks for ur suggestions. But the method set-status or change_state doesn't work. Finally used FM

CALL FUNCTION 'STATUS_CHANGE_EXTERN' which worked and status was updated.

thanks

anya

0 Kudos
329

>

> Hi all,

>

> thanks for ur suggestions. But the method set-status or change_state doesn't work. Finally used FM

>

> CALL FUNCTION 'STATUS_CHANGE_EXTERN' which worked and status was updated.

>

> thanks

> anya

Hi,

IMHO this is a bad solution because it manipulates the status object itself but bypasses all clinical order specific checks and procedures, e.g. order components' business methods bound to a status change, status dependent checks on a field level, etc. actually, it potentially leaves the clinical order item (position) in an inconsistent state.

the static utility classes mentioned above work outside the clinical order process (if they don't, you should file an OSS message). they don't work within the dialog based clinical order process (e.g. in a clinical order BAdI)

kind regards, anton

Former Member
0 Kudos
329

Hi all,

thanks for ur suggestions. But the method set-status or change_state doesn't work. Finally used FM

CALL FUNCTION 'STATUS_CHANGE_EXTERN' which worked and status was updated.

thanks

anya

Former Member
0 Kudos
329

Hi Anton,

thanks a lot for ur informative suggestion. Will take of this point.

By mistake my reply was posted twice.

Thanks a lot once again.

anya