예제 #1
0
$data['modify_id'] = $_SESSION['sess_user_name'];
$data['create_id'] = $_SESSION['sess_user_name'];
$data['create_time'] = date('YmdHis');
switch ($element) {
    case 'icd_code':
        $data['code_version'] = $DRG_obj->ICDVersion();
        $data['diagnosing_clinician'] = $_SESSION['sess_user_name'];
        $data['diagnosing_dept_nr'] = $dept_nr;
        $DRG_obj->useDiagnosis();
        $qlist_type = 'diagnosis';
        break;
    case 'ops_code':
        $data['code_version'] = $DRG_obj->OPSVersion();
        $data['responsible_clinician'] = $_SESSION['sess_user_name'];
        $data['responsible_dept_nr'] = $dept_nr;
        $DRG_obj->useProcedure();
        $qlist_type = 'procedure';
        break;
    case 'ops_intern_code':
        $DRG_obj->useInternalDRG();
        $qlist_type = 'drg_intern';
        if (isset($current) && $current) {
            if (!$DRG_obj->EncounterDRGGroupExists($sel)) {
                $data['group_nr'] = $sel;
                # pass the variable as reference
                $DRG_obj->setDataArray($data);
                # Now insert the data
                $DRG_obj->insertDataFromInternalArray();
                # Set all non-grouped diagnoses and procedures to this group number
                $DRG_obj->groupNonGroupedItems($sel);
                $saveok = 1;