コード例 #1
0
$data['category_nr'] = 99;
// This is a dummy entry to force the new entries to appear below the current entries in the table
$data['history'] = "Create " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n";
$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();