2009 Nov 10 12:42 PM
Hi,
Would like to know has someone implemented the above BADI through which the service-based appointment search of visit scheduling (transaction NR16) can be integrated into the clinical information system i.s.h.med.
We are facing some issue as many input is available in reference of many classes but most of these classes/methods are protected and not able to use the same.
Would be very thankful for your inputs.
Thanks
anya
2009 Nov 10 1:21 PM
hi,
could you be a little bit more specific?
which methods that you need are protected? AFAIK, in CL_EXM_IM_ISHMED_CONN_MEDSYS->IF_EX_ISH_CONN_MEDSYS2APP_SRCH~CONNECT_MEDSYS2APP_SEARCH there are 2 objects referenced, IR_PLANNING_PROCESS and CR_ERRORHANDLER. most of the relevant methods of these objects seem to be public to me at a quick view.
regards, anton
2009 Nov 12 5:35 AM
hi Anton,
thanks for ur reply.
In BADI signature IR_PLANNING_PROCESS is getting references of various classes but not able to access any of these as either the classes or method or attribute is protected. NAPP data is required for creation of clinical order.
For example getting reference of Class CL_ISH_SNAP_APPOINTMENT which has data in internal table G_NTMN & G_NAPP as attributes are private.
How to retrieve data in such scenario.
Looking forward for your inputs.
Anya
2009 Nov 12 8:45 AM
hi anya,
please have a closer look at the example implementation of the BAdI. There you find everything you know. basically, you should not use the snapshot-object, which is actually used for some potential rollback situations.
If you look at the BAdI example implementation you'll find out that the correct class for your purpose is the instance of cl_ish_appointment, which has a get_data-method which in turn gives you all data you need.
In the example implementation you find
* ---------- ---------- ----------
* get appointments
CALL METHOD ir_planning_process->get_apps
EXPORTING
i_current_only = if_ish_current_only_constants=>co_current_only_consider
IMPORTING
et_apps = lt_apps
e_rc = l_rc
CHANGING
cr_errorhandler = cr_errorhandler.
IF l_rc <> 0.
c_rc = l_rc.
RETURN.
ENDIF.
[snip]
LOOP AT lt_apps ASSIGNING <ls_app>.
[snip]
CALL METHOD <ls_app>->get_data
EXPORTING
i_fill_appointment = abap_false
IMPORTING
es_ntmn = ls_ntmn
e_rc = l_rc
CHANGING
c_errorhandler = cr_errorhandler.
ls_app is of type CL_ISH_APPOINTMENT and the get_data method returns you amongst others et_napp, a table of NAPP-items.
anton
2009 Nov 16 5:22 PM
Hi Anton,
Thanks a lot for your valuable inputs which are of great help. Still having few queries which are not clear in SAP documentation
- Method GETCREATE_DATA is to be implemented by customer How to retrieve data required for creation of clinical order like values of l_oe, l_gpart, NAPP data as getting reference of various private Classes.
- Classes/methods mentioned in documents but not available - add_new_cordpos in Class cl_ish_fct_corder doesnu2019t exist.
- method GETPROXY_CORDTYP - Implemented by the customer to get proxy cordtpyid
How to identify service based appointment and create the second order item.
Looking forward for your inputs.
Thanks
anya
2009 Nov 16 9:40 PM
anya,
from what I have learnt what we are discussing here is a preliminary exmaple implementation and documentation made available to you. so it probably doesn't make much sense if we discuss it much further in this forum since nobody else will understand the background. I'd suggest to you to discuss issues with SAP/SIEMENS directly.
For the actual issues:
- cl_ish_fct_corder->add_new_cordpos is available sinc EHP4 patch 6 (see SAP note 1337252)
- getcreate_data is an example of a method to get some basic data needed to create a clinical order; this data cannot be deduced easily in service based appointment search, i.e. your scenario; what you need is an order placer or business partner who creates the order; no-where in NR16 this data is gathered so you might consider to implement a popup to query the user to provide a orderplacer before creating the order or you hard-wire it in your implementation. the same is of course true for the clinical order type to use. No one else but you can know which clinical order type is to be used. So you'll probably hard-wire it or build yourself a customizing table.
... tob e continued ...
Edited by: Anton Wenzelhuemer on Nov 16, 2009 10:40 PM
2009 Nov 16 9:42 PM
- if you believe to be able to extract this order placer data from the found services you are adviced to have a closer look at the example implementation you have. IMHO all useful data is being accessed in this example implementation or at least methods are used, which can be used to access such data
for example, in my last message I supplied a code snippet to retrieve the NTMN entries; the same method als supplies the NAPP entries; just look at the signature of the used method (get_data) more thorougly (and don't always try to access attributes, protected for good reasons, directly)
if you need data of the temporary service object, you find this in the example implementation too
CALL METHOD cl_ish_appointment=>get_prov_services_for_appmnt
EXPORTING
i_appointment = <ls_app>
i_environment = lr_environment
IMPORTING
e_rc = l_rc
et_services = lt_services
...
lr_service ?= <ls_object>-object.
CALL METHOD lr_service->get_data
IMPORTING
es_data = ls_srvp
...
so, IMHO there's a lot in this implementation, you just have to go through it and try to understand it.
actually, what you try to achieve isn't all to simple at all, given the potential possibility of very complex search result leading to very complex clinical orders. maybe you should consider requesting a training or consulting on clinical order management programming from the manufacturers.
my 2 cents and kind regards,
anton
(sorry had to split it due to posting length constraints)
2009 Nov 17 4:54 AM
Hi Anton,
Thaks a ton for providing detailed explanation of queries.
anya