Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/Orders/fODBase.pas

    r829 r1679  
    4444  private
    4545    FDialog: string;
     46    FDialogDisplayName: string;
    4647    FResponseList: TList;
    4748    FPrompts: TList;
     
    99100      const AnIValue, AnEValue: string);
    100101    property Dialog: string            read FDialog         write SetDialog;
     102    property DialogDisplayName: string read FDialogDisplayName write FDialogDisplayName;
    101103    property DisplayGroup: Integer     read FDisplayGroup   write FDisplayGroup;
    102104    property CopyOrder:    string      read FCopyOrder      write SetCopyOrder;
     
    645647  if CopyOrder <> '' then DupORIFN := CopyOrder;
    646648  //if {(CopyOrder <> '') or} (EditOrder <> '') then Exit;  // only check new orders
    647   with FResponseList do for i := 0 to Count - 1 do with TResponse(Items[i]) do
    648     if (PromptID = 'ORDERABLE') or (PromptID = 'ADDITIVE') then
    649     begin
    650       OrderableIEN := IValue;
    651       TheInstance := Instance;
    652       PkgPart := '';
    653       if AFillerID = 'LR' then PkgPart := '^LR^' + IValueFor('SPECIMEN', TheInstance);
    654       if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH')
    655         then PkgPart := U + AFillerID + U + IValueFor('DRUG', TheInstance);
    656         // was -- then PkgPart := '^PS^' + IValueFor('DRUG', TheInstance);
    657       if AFillerID = 'PSIV' then
     649  with FResponseList do
     650    for i := 0 to FResponseList.Count - 1 do
    658651      begin
    659         if PromptID = 'ORDERABLE' then PkgPart := '^PSIV^B;' + IValueFor('VOLUME', TheInstance);
    660         if PromptID = 'ADDITIVE'  then PkgPart := '^PSIV^A';
     652        with TResponse(Items[i]) do
     653          begin
     654            if (PromptID = 'ORDERABLE') or (PromptID = 'ADDITIVE') then
     655              begin
     656                OrderableIEN := IValue;
     657                TheInstance := Instance;
     658                PkgPart := '';
     659                if AFillerID = 'LR' then PkgPart := '^LR^' + IValueFor('SPECIMEN', TheInstance);
     660                if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH') or (AFillerID = 'PSNV')
     661                  then PkgPart := U + AFillerID + U + IValueFor('DRUG', TheInstance);
     662                // was -- then PkgPart := '^PS^' + IValueFor('DRUG', TheInstance);
     663                if AFillerID = 'PSIV' then
     664                  begin
     665                    if PromptID = 'ORDERABLE' then PkgPart := '^PSIV^B;' + IValueFor('VOLUME', TheInstance);
     666                    if PromptID = 'ADDITIVE'  then PkgPart := '^PSIV^A';
     667                  end;
     668                AList.Add(OrderableIEN + PkgPart);
     669              end;
     670            //AGP IV CHANGES
     671            if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH') or (AFillerID = 'PSIV') or (AFillerID = 'PSNV') then
     672              begin
     673                IF PromptID = 'COMMENT' then continue;
     674                Alist.Add(AFillerID + U + PromptID + U + InttoStr(Instance) + U + IValueFor(PromptID, Instance) + U + EValueFor(PromptID, Instance));
     675              end;
    661676      end;
    662       AList.Add(OrderableIEN + PkgPart);
    663     end;
     677  end;
    664678  AStartDtTm := IValueFor('START', 1);
    665679end;
     
    11381152    ExpandOrderObjects(tmp, HasObjects);
    11391153    FOrderContainsObjects := FOrderContainsObjects or HasObjects;
     1154   
     1155    if frmODBase.FAbortOrder then
     1156    begin
     1157      SetTemplateDialogCanceled(FALSE);
     1158      Exit;
     1159    end;
     1160
    11401161    if IEN <> 0 then
    11411162      begin
     
    11551176      CheckBoilerplate4Fields(tmp, cptn);
    11561177    List.Text := tmp;
     1178    if WasTemplateDialogCanceled then frmODBase.FAbortOrder := True;
     1179
    11571180  end;
    11581181
     
    13011324{Caller needs to set pnlMessage.TabOrder}
    13021325begin
     1326  //TDP - Added pnlMessage.Caption for screen reader readability
     1327  pnlMessage.Caption := 'Informational Message.';
    13031328  memMessage.Lines.SetText(PChar(AMessage));
    13041329  //begin CQ: 2640
     
    13231348  FOrderAction := OrderAction;
    13241349  FAbortOrder := False;
     1350  SetTemplateDialogCanceled(False);   //wat/jh CQ 20061
    13251351  case OrderAction of
    13261352  ORDER_NEW:   {nothing};
     
    14681494    StatusText('Order Checking...');
    14691495    Responses.BuildOCItems(OIList, StartDtTm, FillerID);
    1470     OrderChecksOnAccept(Responses.OrderChecks, FillerID, StartDtTm, OIList, DupORIFN);
     1496    OrderChecksOnAccept(Responses.OrderChecks, FillerID, StartDtTm, OIList, DupORIFN,'0');
    14711497    DupORIFN := '';
    14721498    StatusText('');
     
    14901516begin
    14911517  Result := True;
     1518  IsDelayOrder := False;
    14921519  Validate(ErrMsg);
    1493   IsDelayOrder := False;
    14941520  if Length(ErrMsg) > 0 then
    14951521  begin
     
    15001526  if not AcceptOrderChecks then
    15011527  begin
     1528    //added code to shut CPRS down without access violations if the fOCAccept is open when timing out.
     1529    if frmFrame.TimedOut then
     1530      begin
     1531         Result := False;
     1532         Exit;
     1533      end;
    15021534    if AskAnotherOrder(DialogIEN) then
    15031535        InitDialog           // ClearDialogControls is in InitDialog
     
    15411573        else CanSign := CH_SIGN_NA;
    15421574      if NewOrder.Signature = OSS_NOT_REQUIRE then CanSign := CH_SIGN_NA;
    1543       if NewOrder.EventPtr <> '' then IsDelayOrder := True;
    1544       Changes.Add(CH_ORD, NewOrder.ID, NewOrder.Text, Responses.FViewName, CanSign,'',0, NewOrder.DGroupName, False,IsDelayOrder);
     1575      if (NewOrder.EventPtr <> '') and (GetEventDefaultDlg(responses.FEventIFN) <> InttoStr(Responses.QuickOrder)) then
     1576          IsDelayOrder := True;
     1577      Changes.Add(CH_ORD, NewOrder.ID, NewOrder.Text, Responses.FViewName, CanSign,'',0, NewOrder.DGroupName, False, IsDelayOrder);
    15451578
    15461579    UBAGlobals.TargetOrderID := NewOrder.ID;
     
    17111744  //self.Responses.Cancel := False;
    17121745  if User.NoOrdering then Exit;
    1713   if FAbortOrder then exit;
     1746  if FAbortOrder then
     1747  begin
     1748    SetTemplateDialogCanceled(FALSE);
     1749    exit;
     1750  end;
    17141751  if FOrderAction in [ORDER_EDIT, ORDER_COPY] then Exit;  // don't invoke verify dialog
    17151752  if FOrderAction = ORDER_QUICK then Exit;                // should this be here??
Note: See TracChangeset for help on using the changeset viewer.