SAP ABAP IMG Activity BADI_ISH_MD_PROOF (BAdI: Consistency Check for Medical Documentation)
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       NPVS (Package) Application development patient management system
IMG Activity
ID BADI_ISH_MD_PROOF BAdI: Consistency Check for Medical Documentation  
Transaction Code S_KK4_98000019   (empty) 
Created on 20030715    
Customizing Attributes BADI_ISH_MD_PROOF   BAdI: Consistency Check for Medical Documentation 
Customizing Activity BADI_ISH_MD_PROOF   BAdI: Consistency Check for Medical Documentation 
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name ISH_BADI_MD_PROOF    


The BAdI Consistency Check for Medical Documentation (ISH_MD_PROOF) enables you to run content-related checks on the diagnoses, procedures, DRG data, birth data, together with the length of stay, patient master data, case data, movements and the medical status of a case. You can return messages to the calling program via the BAdI. The type of message generated (I = information, W = warning, E = error) influences the subsequent dialog processing. If error messages are triggered, the system prevents the data that is currently being processed from being saved.

The BAdI ISH_MD_PROOF can be run for various events. At present, SAP Patient Management supports the following events:

  • MDP000    Check Med. Doc.: Special report for check
  • MDP001    Check Med. Doc.: Mass grouping RNUDRG0A
  • MDP010    Check Med. Doc.: DRG work station, Rules button
  • MDP011    Check Med. Doc.: DRG work station, Save
  • MDP012    Check Med. Doc.: DRG work station, Group
  • MDP020    Check Med. Doc.: Change basic medical doc. status
  • MDP030    Check Med. Doc.: Diagnosis entry, rules button
  • MDP031    Check Med. Doc.: Diagnosis entry, save
  • MDP040    Check Med. Doc.: Procedure entry, rules button
  • MDP041    Check Med. Doc.: Procedure entry, save
  • MDP050    Check Med. Doc.: Billing, initial screen
  • MDP051    Check Med. Doc.: Billing, execution
  • MDP061    Check Med. Doc.: NV2000, save
  • MDP070    Check Med. Doc.: Surgery doc., rules button
  • MDP071    Check Med. Doc.: Surgery doc., save


If you do not wish to create your own set of rules, you can acquire a commercial product for checking the consistency of special coding guidelines, for example.

Standard settings

The BAdI ISH_MD_PROOF does not have a default implementation. Multiple implementations can be active simultaneously (multiple implementation). The BAdI has a filter by means of which you can activate implementations based on the criteria "country version" and "event".

Two sample implementations are delivered by SAP:

  • IS-H: Does an Admission Diagnosis Exist? (implementation name MD_PROOF_AD_CHECK) IS-H: Does a Hospital Main Diagnosis Exist? (implementation name MD_PROOF_KHD_CHECK).


To optimize the runtime behavior, the medical data is fetched using a call-back mechanism. In other words, the necessary data is not fetched via the parameter 'i_data_provider' with the method 'data_get' until the BAdI runtime (see example). Moreover, only the data that is actually requested is provided.


  METHOD if_ex_ish_md_proof~check . 
DATA patient_data TYPE npat.
DATA case_data TYPE nfal.
DATA los TYPE ish_los.
DATA movement_tab TYPE nbewtab.
DATA drg_tab TYPE ish_t_ndrg.
DATA dia_tab TYPE ish_ndia_tab.
DATA icp_tab TYPE ish_nicp_tab.
DATA return_tab TYPE ish_bapiret2_tab_type.
DATA wa_return TYPE bapiret2.

* data provision of necessary data about parameter i_data_provider
* in dependency of raised event
CASE i_event.
* WHEN 'MDP000'. "Check Med. Doc.: Separate Check Report
* WHEN 'MDP010'. "Check Med. Doc.: DRG Work Station: Rules
* WHEN 'MDP011'. "Check Med. Doc.: DRG Work Station: Save
* WHEN 'MDP012'. "Check Med. Doc.: DRG Work Station: Group
CALL METHOD i_data_provider->data_get
e_patient_data = patient_data
e_case_data = case_data
e_los = los
e_movement_tab = movement_tab
e_drg_tab = drg_tab
e_dia_tab = dia_tab
e_icp_tab = icp_tab
e_return_tab = c_return_tab.

* execute of "Code-Check" inquiries as an example for an
* external commercial check tool:
ss_einri = i_institution
ss_falnr = i_casenumber
ss_event = i_event
ss_nfal = case_data
ss_npat = patient_data
ss_nbewtab = movement_tab
ss_ndiatab = dia_tab
ss_nicptab = icp_tab
ss_ndrgtab = drg_tab
ss_ish_los = los
ss_return = return_tab.

* append received messages
LOOP AT return_tab INTO wa_return.
APPEND wa_return TO c_return_tab.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
Last changed by/on SAP  20030715 
SAP Release Created in 472