Ignore:
Timestamp:
Jul 6, 2008, 9:11:54 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Upload of OR_30_270, 1.0.26.69

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/foia-cprs/CPRS-Chart/fFrame.pas

    r460 r462  
    13541354  Reason: string;
    13551355  CCOWResponse: UserResponse;
     1356
     1357    procedure UpdatePatientInfoForAlert;
     1358    begin
     1359      if Patient.Inpatient then
     1360      begin
     1361        Encounter.Inpatient := True;
     1362        Encounter.Location := Patient.Location;
     1363        Encounter.DateTime := Patient.AdmitTime;
     1364        Encounter.VisitCategory := 'H';
     1365      end;
     1366      if User.IsProvider then Encounter.Provider := User.DUZ;
     1367      SetupPatient(FlaggedPTList);
     1368      if (FlaggedPTList.IndexOf(Patient.DFN) < 0) then
     1369        FlaggedPTList.Add(Patient.DFN);
     1370    end;
     1371
    13561372begin
    13571373  SaveDFN := Patient.DFN;
     
    13771393         HasActiveFlg(FlagList, HasFlag, NewDFN);
    13781394        end;
    1379         if (FCCOWInstalled and (ctxContextor.State = csSuspended)) or (AllowCCOWContextChange(CCOWResponse, Patient.DFN)) then
     1395        if FCCOWInstalled and (ctxContextor.State = csParticipating) then
    13801396          begin
    1381             if Patient.Inpatient then
    1382             begin
    1383               Encounter.Inpatient := True;
    1384               Encounter.Location := Patient.Location;
    1385               Encounter.DateTime := Patient.AdmitTime;
    1386               Encounter.VisitCategory := 'H';
    1387             end;
    1388             if User.IsProvider then Encounter.Provider := User.DUZ;
    1389             SetupPatient(FlaggedPTList);
    1390             if (FlaggedPTList.IndexOf(Patient.DFN) < 0) then
    1391                 FlaggedPTList.Add(Patient.DFN);
     1397            if (AllowCCOWContextChange(CCOWResponse, Patient.DFN)) then
     1398              UpdatePatientInfoForAlert
     1399            else
     1400              begin
     1401                case CCOWResponse of
     1402                  urCancel:
     1403                    begin
     1404                      Patient.DFN := SaveDFN;
     1405                      Notifications.Prior;
     1406                      Exit;
     1407                    end;
     1408                  urBreak:
     1409                    begin
     1410                      // do not revert to old DFN if context was manually broken by user - v26 (RV)
     1411                      if (ctxContextor.State = csParticipating) then Patient.DFN := SaveDFN;
     1412                      UpdatePatientInfoForAlert;
     1413                    end;
     1414                  else
     1415                    UpdatePatientInfoForAlert;
     1416                end;
     1417              end;
    13921418          end
    13931419        else
    1394           begin
    1395             Patient.DFN := SaveDFN;
    1396             if Assigned(FlagList) then
    1397             begin
    1398              FlagList.Clear;
    1399              HasFlag := False;
    1400              HasActiveFlg(FlagList, HasFlag, NewDFN);
    1401             end;
    1402              Notifications.Prior;
    1403             Exit;
    1404           end;
     1420          UpdatePatientInfoForAlert
    14051421      end else
    14061422      begin
     
    16551671                    // do not revert to old DFN if context was manually broken by user - v26 (RV)
    16561672                    if (ctxContextor.State = csParticipating) then Patient.DFN := SaveDFN;
     1673                    SetupPatient;
     1674                    tabPage.TabIndex := PageIDToTab(NextTab);
     1675                    tabPageChange(tabPage);
     1676                  end;
     1677                else
     1678                  begin
    16571679                    SetupPatient;
    16581680                    tabPage.TabIndex := PageIDToTab(NextTab);
     
    40644086  mnuFilePrintSelectedItems.Enabled := True;
    40654087  mnuFileNotifRemove.Enabled := True;
    4066   if FCCOWIconName= 'BMP_CCOW_BROKEN' then
    4067   begin
    4068     mnuFileResumeContext.Enabled := True;
    4069     mnuFileBreakContext.Enabled := False;
    4070   end else
    4071   begin
    4072     mnuFileResumeContext.Enabled := False;
    4073     mnuFileBreakContext.Enabled := True;
    4074   end;
    4075 
     4088  if not FCCOWError then
     4089  begin
     4090    if FCCOWIconName= 'BMP_CCOW_BROKEN' then
     4091    begin
     4092      mnuFileResumeContext.Enabled := True;
     4093      mnuFileBreakContext.Enabled := False;
     4094    end else
     4095    begin
     4096      mnuFileResumeContext.Enabled := False;
     4097      mnuFileBreakContext.Enabled := True;
     4098    end;
     4099  end;
    40764100  mnuEdit.Enabled := True;
    40774101  mnuView.Enabled := True;
Note: See TracChangeset for help on using the changeset viewer.