cancel
Showing results for 
Search instead for 
Did you mean: 

Migrate Legacy data to EHS-Operational health

himanshu_gupta2
Participant
0 Kudos

Hello,

I need some information if anyone have done the migration of data from legacy system to EHS-OH.

Problem what i am facing is that there is no direct BAPI availble to create medical service, assign protocol, examination, diagnosis etc.

Since all these records are in past and if I create examination or diagnosis some of the date fields created with current date but we need it in past.

Please help.

Regards

Himanshu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Himanshu,

SAP EHS-OH provides standard way of importing medical data through t-code EHSDATIMP.

You can import the results of medical tests as ASCII files through the function module EHS00MDATAUPL_IMPORT. Please read below help.

Medical Data Import (Generic) - Occupational Health (EHS-HEA) - SAP Library

Please also explore the available BAdI Import of Medical Data (Examination Results) through which you can also fill further fields, carry out data conversions, and conduct checks, or implement additional functions after saving data. Also explore BAdI "Specify References for Importing Medical Data" through which you can assign a unique reference ID against the data records (e.g. employee no., or Social Security no.) while data is imported.

Regards,

Pavan

himanshu_gupta2
Participant
0 Kudos

Hello Pavan,

My requirement is to first create medical service and assign protocols as its a fresh development and data need to migrate from legacy systems.

Is the transaction will create

1) medical service

2) assign protocol

3) examination creation with result pass/fail . No need to create evaluation or tests of examination

4) creation of diagnosis might be in past or future with data

5) create appointments

Former Member
0 Kudos

Hi Himanshu,

Here is my proposal.

  • Create Medical Services and assign protocol beforehand.
  • Prepare legacy data in the ASCII format as per below field details.

Medical Data Import (Generic) - Occupational Health (EHS-HEA) - SAP Library

  • Use field "person_reference" for assigning existing Service number to the examination results being uploaded
  • Use available BADIs to covert/massage data
  • Import even pass/fail results against the examinations (see the available fields in ASCII format)
  • Once data import is over, check if you can schedule appointments for further diagnosis /follow-up through front-end t-codes

Hope it helps. I am not sure on the diagnosis part though. You need to try a sample 5-10 sets of data and explore the available options to get all the answers.

Regards,

Pavan

himanshu_gupta2
Participant
0 Kudos

Hi Pavan,

Thanks for the information.

1) I will create medical service and assign protocol beforehand.

2) if i import data , is it available in past as medical service created in today date ?

3) can you please give me some BADI name that available ? is it possible to change the date to previous in that part ?

Do you have information about PREHEAL table ?

Regards

himanshu Gupta

Former Member
0 Kudos

Hi Himanshu,

Yes; you should be able to create back-dated examinations (please refer fields of 'exam_date' in data template). Please ensure that your created medical service date is consistent with the legacy data date which you would be importing.

Please explore BADI  'EHSH_SRV_EXA_SCR' for your requirements.

I could not find table containing 'PREHEAL' character; you might be talking about 'T7EHS00_PERHEAL' : Assignment Person / Health Center?

Regards,

Pavan

himanshu_gupta2
Participant
0 Kudos

Hi Pawan,

how can i create medical service back in date ? usually through FM it creates on current date.

yes i am talking about 'T7EHS00_PERHEAL' : Assignment Person / Health Center

best regards

himanshu_gupta2
Participant
0 Kudos

can you please help me in FM'EHS00MDATAUPL_IMPORT' , i am not able to find which table, structure or table type it refering to.

i debug the code and everything is dynamic

Former Member
0 Kudos

Hi Himanshu,

I don't think you can create back-dated medical services. Also, I don't see significance of medical service date when it comes to importing historical, closed services. Even when it is about open services also, how does it matter if some of the services has cut-over date as 'Service Opening' date when examination date is correctly maintained (only ensure that examination date is prior to service opening date)? Once system is operational, anyway dates would be automatically taken care of.

Regards,

Pavan

himanshu_gupta2
Participant
0 Kudos

if medical service not in past then is it possible to create examination in past ?

I am really sorry i am not understood much as i am new to this module.

My complete requirement is

the requirements for migrating the historical Medical Services and open appointments from the current legacy system to SAP EHS:

  • Appointments open at go-live
  • Medical Services historical data (last 2 assessments or surveillance of each type that will allow to trigger the subsequent examination)
Former Member
0 Kudos

Hi Himanshu,

Unfortunately, I am not a developer . May be, please also check function modules available in function group EHS00MDATAUPL if it helps:

  •   EHS_AUD_UPL (upload audiometer data)
  •   EHS_PUL_UPL (upload pulmonary function data)
  •   EHS_LAB_UPL (upload laboratory data)
  •   EHS_PROT_DEL (delete logs for object EHS_OH_IM)

Regards,

Pavan

himanshu_gupta2
Participant
0 Kudos

Thanks Pavan for the promt reply . It really help me out.

I have check some function module through which we can create the medical service, examination , diagnosis in past. Will they impact something in functional way ?

If you have any document regarding EHS-OH please share so that i can understand the complete process from functional point.

regards

Himanshu Gupta

Former Member
0 Kudos

Hi Himanshu,

I don't think function modules would impact your functional design if you take care of unique identifiers for each data records. Client specific documents can't be shared here; please google a bit, you will find some useful docs.

Please mark the thread as 'answered' if you are good to go.

Regards,

Pavan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I am not a developer either.  We struggled to load our data aswell and eventually we did LSMW's for each data set because the tables have so many dependancies.

Important to remember that the EHS internal number assigned to a person is used on all the EHS tables not the person ID.

With a LSMW we created the service and assigned the protocol using the "performed on date" as the historic surveillance date because you cannot change the "service opened on" date. And your frequencies use the performed on date to determine the next due date.

Then we exported the service number SRV_NUMBER and PERNR from T7EHS00_SERVICE and INTPERNR and PERSON_ID (note:PERSON_ID uses 10 chars) from T7EHS00_MAPPERNR.

With that export we were able to create separate uploads for the rest. Each data set type has its own tables and screens so we created uploads for protocol update, diagnosis, restrictions, physical exams, lab exams, audiometry, lung function etc.. The key to everything is the service number and the mappernr if you are using different types of persons (A,B,C) if you are using an ABAP program .

Tables

T7EHS00_MAPPERNR (Internal EHS person ID assigned to type A : employee (PA tables) or type B : Applicant (PB tables) or type C : Business partners (BUTtables)

T7EHS00_SERVICE (Service table)

T7EHS00_SRV_PROT  (protocol assigned to a service may be more than one) and stores the examination type (SRV_PROTTYPE )

T7EHS00_PERHEAL

T7EHS00_EXA_PHY 

T7EHS00_EXA_AUD

T7EHS00_EXA_LAB

T7EHS00_EXA_PUL

T7EHS00_SRV_EXA (gives the result detail for the _EXA_ tables)

T7EHS00_SRV_DIA (diagnosis)

Notes:

Use service number for the diagnosis load aswell and do not - I repeat - do not put in an end date leave the end date as 9999-12-31 for the diagnosis else you will not be able to delete the diagnosis or edit details of it later.

T7EHS00_PERHEAL - make sure you do assign all persons to a health centre. It is date delimited so can change but cannot change on the same day as it was assigned so mistakes are not good here.  Also later for reporting this makes it much quicker if you have a health centre assigned to every person. Again the PERNR is the mappernr not the person ID

Make sure that your test dates are same or later than the exam date else it will fail because you cant have a result date earlier than an exam date.

Make sure that you create your exams/test/protocols etc. master data. with a start date way before the go-live date else you can only use them from that date onwards and will not be able to create data on earlier dates.

A service can only be re-opened once a day.

It is different for each site depending on what they want and the initial setup done.

So I hope this helps you a little bit? Good luck

Sherri

himanshu_gupta2
Participant
0 Kudos

Hi Sherri,

Thanks for the complete information.

Can you tell me how do you use the export functionality for each upload? as i see it ask me the table name, structure , tabletype if i use for upload ? did you use that or directly create the file ?

Former Member
0 Kudos

Once we had the list from the legacy system in excel we used trx LSMW upload to assign health centre, create service and assign the protocol on OH with trx EHSAMTAET.  We did not go through the OH planning cockpit for the uploads.

The good thing with the LSMW is that the dependant tables (plenty of them) are also updated which can be very tricky if you try to directly create the file.

To export, if you have access to trx SE16 on ECC client  (mostly dont) then just export the fields directly from the table - always service number and pernr (mappernr) and personID to establish a link back to the legacy data in excel or whatever format you have.

Else use trx SQVi to create a query on the two tables to export the detail.

Once you have the personID as mapped to the Service number you can upload with LSMW.

The trick is to group your legacy data so that you can match the screens and not do multiple services or protocols on one load (so that your selection in the LSMW follows the same for all the data).  The trx EHSAMBTAET in the LSMW recording is difficult.

s