Ignore:
Timestamp:
Jul 6, 2008, 8:20:14 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Uploading from OR_30_258

File:
1 edited

Legend:

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

    r459 r460  
    5858procedure QuickOrderListEdit;
    5959function RefNumFor(AnOwner: TComponent): Integer;
    60 procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char);
     60procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0);
    6161procedure SetFontSize( FontSize: integer);
    6262procedure NextMove(var NMRec: TNextMoveRec; LastIndex: Integer; NewIndex: Integer);
     
    7474MedsDisp : Integer;
    7575ClinDisp : Integer; //IMO
     76NurDisp  : Integer;
    7677IVDisp   : Integer;
    7778CsltDisp : Integer;
    7879ProcDisp : Integer;
     80ImgDisp  : Integer;
    7981NonVADisp: Integer;
    8082MedsInDlgIen  : Integer;
     
    9496
    9597uses fODDiet, fODMisc, fODGen, fODMedIn, fODMedOut, fODText, fODConsult, fODProc, fODRad,
    96      fODLab, fODMeds, fODMedIV, fODVitals, fODAuto, fODAllgy, fOMNavA, rCore, uCore, fFrame,
     98     fODLab, fodBBank, fODMeds, fODMedIV, fODVitals, fODAuto, (*fODAllgy,*) fOMNavA, rCore, uCore, fFrame,
    9799     fEncnt, fEffectDate, fOMVerify, fOrderSaveQuick, fOMSet, rMisc, uODBase, rODMeds,
    98100     fLkUpLocation, fOrdersPrint, fOMAction, fARTAllgy, fOMHTML, fOrders, rODBase,
    99101     fODChild, fMeds, rMeds, rPCE, frptBox, fODMedNVA, fODChangeUnreleasedRenew, rODAllergy,
    100      UBAGlobals;
     102     UBAGlobals, fClinicWardMeds, uTemplateFields;
    101103
    102104var
     
    142144  TX_NO_QUICK   = 'This ordering dialog does not support quick orders.';
    143145  TC_NO_QUICK   = 'Save/Edit Quick Orders';
     146  TX_CANT_SAVE_QO = 'This order contains TIU objects, which may result in patient-specific' + CRLF +
     147                    'information being included in the order.  For this reason, it may not' + CRLF +
     148                    'be saved as a personal quick order for later reuse.';
    144149  TX_NO_COPY    = CRLF + CRLF + '- cannot be copied.' + CRLF + CRLF + 'Reason: ';
    145150  TC_NO_COPY    = 'Unable to Copy Order';
     
    152157  STEP_FORWARD  = 1;
    153158  STEP_BACK     = -1;
    154   TX_NOINPT     = 'You can not place inpatient medication order on a clinic location for selected inpatient.';
     159  TX_NOINPT     = ': You cannot place inpatient medication orders from a clinic location for selected patient.';
    155160  TX_IMO_WARNING1 = 'You are ';
    156   TX_IMO_WARNING2 = ' Clinic Medication orders. The New orders will be saved as Clinic Medication orders and will NOT be available in BCMA';
     161  TX_IMO_WARNING2 = ' Clinic Orders. The New orders will be saved as Clinic Orders and MAY NOT be available in BCMA';
    157162
    158163
     
    200205  OD_DIET:      DialogClass := TfrmODDiet;
    201206  OD_LAB:       DialogClass := TfrmODLab;
     207  OD_BB:        DialogClass := TfrmODBBank;
    202208  OD_CONSULT:   DialogClass := TfrmODCslt;
    203209  OD_PROCEDURE: DialogClass := TfrmODProc;
    204210  OD_TEXTONLY:  DialogClass := TfrmODText;
    205211  OD_VITALS:    DialogClass := TfrmODVitals;
    206   OD_ALLERGY:   DialogClass := TfrmODAllergy;
     212  //OD_ALLERGY:   DialogClass := TfrmODAllergy;
    207213  OD_AUTOACK:   DialogClass := TfrmODAuto;
    208214  else Exit;
     
    391397      else
    392398      begin
    393         ResolvedDialog.DisplayGroup := InptDisp;
    394         ResolvedDialog.DialogIEN    := MedsInDlgIen;
    395         ResolvedDialog.FormID       := MedsInDlgFormId;
     399        //AGP changes to handle IMO INV Dialog opening the unit dose dialog.
     400        if (ResolvedDialog.DisplayGroup = ClinDisp) and (Resolveddialog.DialogIEN = MedsIVDlgIEN) and (ResolvedDialog.FormID = MedsIVDlgFormId) then
     401          begin
     402            ResolvedDialog.DisplayGroup := IVDisp;
     403            ResolvedDialog.DialogIEN    := MedsIVDlgIen;
     404            ResolvedDialog.FormID       := MedsIVDlgFormId;
     405          end
     406        else
     407          begin
     408            ResolvedDialog.DisplayGroup := InptDisp;
     409            ResolvedDialog.DialogIEN    := MedsInDlgIen;
     410            ResolvedDialog.FormID       := MedsInDlgFormId;
     411          end;
    396412        if Length(ResolvedDialog.ShowText)>0 then
    397413          ResolvedDialog.QuickLevel   := 2;
     
    452468  IVDisp   := DisplayGroupByName('IV RX');
    453469  ClinDisp := DisplayGroupByName('C RX');
     470  NurDisp  := DisplayGroupByName('NURS');
    454471  CsltDisp := DisplayGroupByName('CSLT');
    455472  ProcDisp := DisplayGroupByName('PROC');
     473  ImgDisp  := DisplayGroupByName('XRAY');
    456474  NonVADisp := DisplayGroupByName('NV RX');
    457475  MedsInDlgIen  := DlgIENForName('PSJ OR PAT OE');
     
    817835    ResolvedDialog.DisplayGroup := ClinDisp;
    818836  ResetDialogProperties(AnID, AnEvent, ResolvedDialog);
     837 {* AGP CHANGE 26.20 Remove restriction to allowed for ordering of inpatient medication for an inpatient from an outpatient location
    819838   //jd imo change
    820839   if (ResolvedDialog.DisplayGroup = InptDisp) and (Patient.Inpatient) and (AnEvent.EventIFN < 1) then
     
    826845     end;
    827846   end;
    828    //jd imo change end
     847   //jd imo change end  *}
    829848   if (ResolvedDialog.DisplayGroup = InptDisp) or
    830849      (ResolvedDialog.DisplayGroup = OutptDisp) or
     
    865884    if NSSchedule then ResolvedDialog.QuickLevel := 0;
    866885  end;
     886  with ResolvedDialog do if (QuickLevel = QL_VERIFY) and (HasTemplateField(ShowText)) then QuickLevel := QL_DIALOG;
    867887  with ResolvedDialog do
    868888  begin
     
    10031023                       begin
    10041024                       ShowModal;
    1005                        //Application.ProcessMessages;
    10061025                       Result := uOrderDialog.AcceptOK;
    10071026                       uOrderDialog.Destroy;
     
    10101029                       begin
    10111030                       Show;
    1012                        //Application.ProcessMessages;
    10131031                       Result := True;
    10141032                       end;
     
    10501068  OrdList: TList;
    10511069  theOrder: TOrder;
    1052 begin
     1070 // i: integer;
     1071begin
     1072 // if Assigned(OrdList) then
     1073 // begin
     1074 //    for i := 0 to pred(OrdList.Count) do
     1075 //       TObject(OrdList[i]).Free;
     1076  //   UBAGlobals.tempDxList := nil;
     1077 // end;
    10531078  OrdList := TList.Create;
    10541079  theOrder := TOrder.Create;
     
    10571082  RetrieveOrderFields(OrdList, 0, 0);
    10581083  Result := TOrder(OrdList.Items[0]).Text;
     1084  if Assigned(OrdList) then OrdList.Free; //CQ:7554
    10591085end;
    10601086
     
    13491375        param2 := FieldsForEditRenewOrder.StopTime;
    13501376      end;
    1351        UBAGlobals.SourceOrderID := AList[i]; //hds6265 added
     1377      UBAGlobals.SourceOrderID := AList[i]; //hds6265 added
    13521378      ExecuteChangeRenewedOrder(AList[i], param1, param2, txtOrder);
    13531379      AnOrder := TOrder.Create;
     
    13931419var
    13941420  i: Integer;
    1395   xx,xy: string;
     1421  xx: string;
    13961422  IsIMOOD,ForIVAlso: boolean;
    13971423begin
     
    16021628      Exit;
    16031629    end;
     1630    if Responses.OrderContainsObjects then
     1631    begin
     1632      InfoBox(TX_CANT_SAVE_QO, TC_NO_QUICK, MB_ICONERROR or MB_OK);
     1633      Exit;
     1634    end;
    16041635    SaveAsQuickOrder(Responses);
    16051636  end;
     
    16391670
    16401671
    1641 procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char);
     1672procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0);
    16421673const
    16431674  TX_NEW_LOC1   = 'The patient''s location has changed to ';
     
    16521683  PrintIt: Boolean;
    16531684begin
    1654   CurrentLocationForPatient(Patient.DFN, ALocation, AName, ASvc);
    1655   if (ALocation > 0) and (ALocation <> Encounter.Location) then
    1656   begin
    1657     Encounter.Location := ALocation;
    1658     if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES
    1659       then Encounter.Location := ALocation;
    1660   end;
     1685  if PrintLoc = 0 then
     1686    begin
     1687      CurrentLocationForPatient(Patient.DFN, ALocation, AName, ASvc);
     1688      if (ALocation > 0) and (ALocation <> Encounter.Location) then
     1689        begin
     1690          if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES
     1691          then Encounter.Location := ALocation;
     1692        end;
     1693    end
     1694  else
     1695    Encounter.Location := PrintLoc;
    16611696  if Encounter.Location = 0
    16621697    then Encounter.Location := CommonLocationForOrders(OrderList);
     
    17471782        if CharAt(AnID,1) = 'X' then actName := 'change';
    17481783        if CharAt(AnID,1) = 'C' then actName := 'copy';
    1749         x := 'You can not ' + actName + ' the clinical medication order.';
     1784        x := 'You cannot ' + actName + ' the clinical medication order.';
    17501785        x := RetrieveOrderText(Copy(AnID, 2, Length(AnID))) + #13#13#10 + x;
    17511786        UnlockOrder(Copy(AnID, 2, Length(AnID)));
     
    17741809      if (not AllowActionOnIMO(AnEventType)) then
    17751810      begin
    1776         x := 'You can not renew the the clinical medication order.';
     1811        x := 'You cannot renew the clinical medication order.';
    17771812        x := RetrieveOrderText(Piece(AnID,'^',2)) + #13#13#10 + x;
    17781813        UnlockOrder(Piece(AnID,'^',2));
     
    18091844  OriginalMedsInHeight    := 0;
    18101845  OriginalNonVAMedsHeight := 0;
     1846
    18111847end.
Note: See TracChangeset for help on using the changeset viewer.