Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/Orders/uOrders.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/Orders/uOrders.pas
r459 r460 58 58 procedure QuickOrderListEdit; 59 59 function RefNumFor(AnOwner: TComponent): Integer; 60 procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char );60 procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0); 61 61 procedure SetFontSize( FontSize: integer); 62 62 procedure NextMove(var NMRec: TNextMoveRec; LastIndex: Integer; NewIndex: Integer); … … 74 74 MedsDisp : Integer; 75 75 ClinDisp : Integer; //IMO 76 NurDisp : Integer; 76 77 IVDisp : Integer; 77 78 CsltDisp : Integer; 78 79 ProcDisp : Integer; 80 ImgDisp : Integer; 79 81 NonVADisp: Integer; 80 82 MedsInDlgIen : Integer; … … 94 96 95 97 uses fODDiet, fODMisc, fODGen, fODMedIn, fODMedOut, fODText, fODConsult, fODProc, fODRad, 96 fODLab, f ODMeds, fODMedIV, fODVitals, fODAuto, fODAllgy,fOMNavA, rCore, uCore, fFrame,98 fODLab, fodBBank, fODMeds, fODMedIV, fODVitals, fODAuto, (*fODAllgy,*) fOMNavA, rCore, uCore, fFrame, 97 99 fEncnt, fEffectDate, fOMVerify, fOrderSaveQuick, fOMSet, rMisc, uODBase, rODMeds, 98 100 fLkUpLocation, fOrdersPrint, fOMAction, fARTAllgy, fOMHTML, fOrders, rODBase, 99 101 fODChild, fMeds, rMeds, rPCE, frptBox, fODMedNVA, fODChangeUnreleasedRenew, rODAllergy, 100 UBAGlobals ;102 UBAGlobals, fClinicWardMeds, uTemplateFields; 101 103 102 104 var … … 142 144 TX_NO_QUICK = 'This ordering dialog does not support quick orders.'; 143 145 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.'; 144 149 TX_NO_COPY = CRLF + CRLF + '- cannot be copied.' + CRLF + CRLF + 'Reason: '; 145 150 TC_NO_COPY = 'Unable to Copy Order'; … … 152 157 STEP_FORWARD = 1; 153 158 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.'; 155 160 TX_IMO_WARNING1 = 'You are '; 156 TX_IMO_WARNING2 = ' Clinic Medication orders. The New orders will be saved as Clinic Medication orders and willNOT 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'; 157 162 158 163 … … 200 205 OD_DIET: DialogClass := TfrmODDiet; 201 206 OD_LAB: DialogClass := TfrmODLab; 207 OD_BB: DialogClass := TfrmODBBank; 202 208 OD_CONSULT: DialogClass := TfrmODCslt; 203 209 OD_PROCEDURE: DialogClass := TfrmODProc; 204 210 OD_TEXTONLY: DialogClass := TfrmODText; 205 211 OD_VITALS: DialogClass := TfrmODVitals; 206 OD_ALLERGY: DialogClass := TfrmODAllergy;212 //OD_ALLERGY: DialogClass := TfrmODAllergy; 207 213 OD_AUTOACK: DialogClass := TfrmODAuto; 208 214 else Exit; … … 391 397 else 392 398 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; 396 412 if Length(ResolvedDialog.ShowText)>0 then 397 413 ResolvedDialog.QuickLevel := 2; … … 452 468 IVDisp := DisplayGroupByName('IV RX'); 453 469 ClinDisp := DisplayGroupByName('C RX'); 470 NurDisp := DisplayGroupByName('NURS'); 454 471 CsltDisp := DisplayGroupByName('CSLT'); 455 472 ProcDisp := DisplayGroupByName('PROC'); 473 ImgDisp := DisplayGroupByName('XRAY'); 456 474 NonVADisp := DisplayGroupByName('NV RX'); 457 475 MedsInDlgIen := DlgIENForName('PSJ OR PAT OE'); … … 817 835 ResolvedDialog.DisplayGroup := ClinDisp; 818 836 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 819 838 //jd imo change 820 839 if (ResolvedDialog.DisplayGroup = InptDisp) and (Patient.Inpatient) and (AnEvent.EventIFN < 1) then … … 826 845 end; 827 846 end; 828 //jd imo change end 847 //jd imo change end *} 829 848 if (ResolvedDialog.DisplayGroup = InptDisp) or 830 849 (ResolvedDialog.DisplayGroup = OutptDisp) or … … 865 884 if NSSchedule then ResolvedDialog.QuickLevel := 0; 866 885 end; 886 with ResolvedDialog do if (QuickLevel = QL_VERIFY) and (HasTemplateField(ShowText)) then QuickLevel := QL_DIALOG; 867 887 with ResolvedDialog do 868 888 begin … … 1003 1023 begin 1004 1024 ShowModal; 1005 //Application.ProcessMessages;1006 1025 Result := uOrderDialog.AcceptOK; 1007 1026 uOrderDialog.Destroy; … … 1010 1029 begin 1011 1030 Show; 1012 //Application.ProcessMessages;1013 1031 Result := True; 1014 1032 end; … … 1050 1068 OrdList: TList; 1051 1069 theOrder: TOrder; 1052 begin 1070 // i: integer; 1071 begin 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; 1053 1078 OrdList := TList.Create; 1054 1079 theOrder := TOrder.Create; … … 1057 1082 RetrieveOrderFields(OrdList, 0, 0); 1058 1083 Result := TOrder(OrdList.Items[0]).Text; 1084 if Assigned(OrdList) then OrdList.Free; //CQ:7554 1059 1085 end; 1060 1086 … … 1349 1375 param2 := FieldsForEditRenewOrder.StopTime; 1350 1376 end; 1351 1377 UBAGlobals.SourceOrderID := AList[i]; //hds6265 added 1352 1378 ExecuteChangeRenewedOrder(AList[i], param1, param2, txtOrder); 1353 1379 AnOrder := TOrder.Create; … … 1393 1419 var 1394 1420 i: Integer; 1395 xx ,xy: string;1421 xx: string; 1396 1422 IsIMOOD,ForIVAlso: boolean; 1397 1423 begin … … 1602 1628 Exit; 1603 1629 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; 1604 1635 SaveAsQuickOrder(Responses); 1605 1636 end; … … 1639 1670 1640 1671 1641 procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char );1672 procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0); 1642 1673 const 1643 1674 TX_NEW_LOC1 = 'The patient''s location has changed to '; … … 1652 1683 PrintIt: Boolean; 1653 1684 begin 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; 1661 1696 if Encounter.Location = 0 1662 1697 then Encounter.Location := CommonLocationForOrders(OrderList); … … 1747 1782 if CharAt(AnID,1) = 'X' then actName := 'change'; 1748 1783 if CharAt(AnID,1) = 'C' then actName := 'copy'; 1749 x := 'You can 1784 x := 'You cannot ' + actName + ' the clinical medication order.'; 1750 1785 x := RetrieveOrderText(Copy(AnID, 2, Length(AnID))) + #13#13#10 + x; 1751 1786 UnlockOrder(Copy(AnID, 2, Length(AnID))); … … 1774 1809 if (not AllowActionOnIMO(AnEventType)) then 1775 1810 begin 1776 x := 'You can not renew thethe clinical medication order.';1811 x := 'You cannot renew the clinical medication order.'; 1777 1812 x := RetrieveOrderText(Piece(AnID,'^',2)) + #13#13#10 + x; 1778 1813 UnlockOrder(Piece(AnID,'^',2)); … … 1809 1844 OriginalMedsInHeight := 0; 1810 1845 OriginalNonVAMedsHeight := 0; 1846 1811 1847 end.
Note:
See TracChangeset
for help on using the changeset viewer.