Changeset 830 for cprs/trunk/CPRS-Chart/rCore.pas
- Timestamp:
- Jul 7, 2010, 4:51:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/rCore.pas
r456 r830 104 104 { General calls } 105 105 106 function GetProgramFilesPath: String;107 106 function ExternalName(IEN: Int64; FileNumber: Double): string; 108 107 function PersonHasKey(APerson: Int64; const AKey: string): Boolean; … … 118 117 function GetUserInfo: TUserInfo; 119 118 function GetUserParam(const AParamName: string): string; 119 procedure GetUserListParam(Dest: TStrings; const AParamName: string); 120 120 function HasSecurityKey(const KeyName: string): Boolean; 121 121 function HasMenuOptionAccess(const OptionName: string): Boolean; … … 152 152 procedure ListProviderTop(Dest: TStrings); 153 153 function SubSetOfProviders(const StartFrom: string; Direction: Integer): TStrings; 154 function SubSetOfCosigners(const StartFrom: string; Direction: Integer; Date: TFMDateTime; 155 ADocType: integer; ATitle: integer): TStrings; 154 156 procedure ListClinicTop(Dest: TStrings); 155 157 function SubSetOfClinics(const StartFrom: string; Direction: Integer): TStrings; … … 210 212 function HasRemoteData(const DFN: string; var ALocations: TStringList): Boolean; 211 213 function CheckHL7TCPLink: Boolean; 212 function UseVistaWeb: Boolean;213 214 function GetVistaWebAddress(value: string): string; 214 procedure ChangeVistaWebParam(value: string);215 215 216 216 implementation … … 219 219 220 220 var 221 uFMToday: TFMDateTime; // Today's date in Fileman format.222 221 uPtListDfltSort: string = ''; // Current user's patient selection list default sort order. 223 222 … … 225 224 226 225 function FormatSSN(const x: string): string; 227 {places the dashes in a social security number } 228 226 { places the dashes in a social security number } 229 227 //vwpt code 4/17/0 see below 230 228 var … … 267 265 { return the current date in Fileman format } 268 266 begin 269 if uFMToday = 0 then uFMToday := Int(FMNow); 270 Result := uFMToday; 267 Result := Int(FMNow); 271 268 end; 272 269 … … 318 315 begin 319 316 CallV('ORWPT CLINRNG', [nil]); 320 Dest.Assign(RPCBrokerV.Results);317 FastAssign(RPCBrokerV.Results, Dest); 321 318 end; 322 319 … … 328 325 329 326 { General calls } 330 331 function GetProgramFilesPath: String;332 Const333 CSIDL_PROGRAM_FILES = $0026;334 var335 Path: array[0..Max_Path] of Char;336 begin337 Path := '';338 SHGetSpecialFolderPath(0,Path,CSIDL_PROGRAM_FILES,false);339 Result := Path;340 end;341 327 342 328 function ExternalName(IEN: Int64; FileNumber: Double): string; … … 441 427 end; 442 428 429 procedure GetUserListParam(Dest: TStrings; const AParamName: string); 430 var 431 tmplst: TStringList; 432 begin 433 tmplst := TStringList.Create; 434 try 435 tCallV(tmplst, 'ORWU PARAMS', [AParamName]); 436 FastAssign(tmplst, Dest); 437 finally 438 tmplst.Free; 439 end; 440 end; 441 443 442 function HasSecurityKey(const KeyName: string): Boolean; 444 443 { returns true if the currently logged in user has a given security key } … … 472 471 //UpdateUnsignedOrderAlerts(Patient.DFN); //moved to AFTER signature and DC actions 473 472 tCallV(tmplst, 'ORWORB FASTUSER', [nil]); 474 Dest.Assign(tmplst);473 FastAssign(tmplst, Dest); 475 474 finally 476 475 tmplst.Free; … … 593 592 CallV('ORQPT SPECIALTIES', [nil]); 594 593 MixedCaseList(RPCBrokerV.Results); 595 Dest.Assign(RPCBrokerV.Results);594 FastAssign(RPCBrokerV.Results, Dest); 596 595 end; 597 596 … … 601 600 CallV('ORQPT TEAMS', [nil]); 602 601 MixedCaseList(RPCBrokerV.Results); 603 Dest.Assign(RPCBrokerV.Results);602 FastAssign(RPCBrokerV.Results, Dest); 604 603 end; 605 604 … … 609 608 CallV('ORQPT WARDS', [nil]); 610 609 //MixedCaseList(RPCBrokerV.Results); 611 Dest.Assign(RPCBrokerV.Results);610 FastAssign(RPCBrokerV.Results, Dest); 612 611 end; 613 612 … … 623 622 CallV('ORWU NEWPERS', [StartFrom, Direction, 'PROVIDER']); 624 623 // MixedCaseList(RPCBrokerV.Results); 624 Result := RPCBrokerV.Results; 625 end; 626 627 function SubSetOfCosigners(const StartFrom: string; Direction: Integer; Date: TFMDateTime; 628 ADocType: integer; ATitle: integer): TStrings; 629 { returns a pointer to a list of cosigners (for use in a long list box) - The return value is 630 a pointer to RPCBrokerV.Results, so the data must be used BEFORE the next broker call! } 631 begin 632 if ATitle > 0 then ADocType := 0; 633 // CQ #17218 - Correcting order of parameters for this call 634 // CallV('ORWU2 COSIGNER', [StartFrom, Direction, Date, ATitle, ADocType]); 635 CallV('ORWU2 COSIGNER', [StartFrom, Direction, Date, ADocType, ATitle]); 636 637 // MixedCaseList(RPCBrokerV.Results); 625 638 Result := RPCBrokerV.Results; 626 639 end; … … 726 739 end; 727 740 MixedCaseList(tmplst); 728 Dest.Assign(tmplst);741 FastAssign(tmplst, Dest); 729 742 finally 730 743 tmplst.Free; … … 738 751 SortByPiece(TStringList(RPCBrokerV.Results), U, 2); 739 752 MixedCaseList(RPCBrokerV.Results); 740 Dest.Assign(RPCBrokerV.Results);753 FastAssign(RPCBrokerV.Results, Dest); 741 754 end; 742 755 … … 747 760 SortByPiece(TStringList(RPCBrokerV.Results), U, 2); 748 761 MixedCaseList(RPCBrokerV.Results); 749 Dest.Assign(RPCBrokerV.Results);762 FastAssign(RPCBrokerV.Results, Dest); 750 763 end; 751 764 … … 756 769 SortByPiece(TStringList(RPCBrokerV.Results), U, 2); 757 770 MixedCaseList(RPCBrokerV.Results); 758 Dest.Assign(RPCBrokerV.Results);771 FastAssign(RPCBrokerV.Results, Dest); 759 772 end; 760 773 … … 784 797 end; 785 798 MixedCaseList(Results); 786 Dest.Assign(Results);799 FastAssign(Results, Dest); 787 800 end; 788 801 end; … … 800 813 SortByPiece(TStringList(RPCBrokerV.Results), U, 2); 801 814 MixedCaseList(RPCBrokerV.Results); 802 Dest.Assign(RPCBrokerV.Results);815 FastAssign(RPCBrokerV.Results, Dest); 803 816 end; 804 817 … … 832 845 833 846 //END VWPT ADDITIONS 847 834 848 procedure ListPtByLast5(Dest: TStrings; const Last5: string); 835 849 var … … 851 865 end; 852 866 MixedCaseList(RPCBrokerV.Results); 853 Dest.Assign(RPCBrokerV.Results);867 FastAssign(RPCBrokerV.Results, Dest); 854 868 end; 855 869 … … 873 887 end; 874 888 MixedCaseList(RPCBrokerV.Results); 875 Dest.Assign(RPCBrokerV.Results);889 FastAssign(RPCBrokerV.Results, Dest); 876 890 end; 877 891 … … 902 916 end; 903 917 MixedCaseList(RPCBrokerV.Results); 904 Dest.Assign(RPCBrokerV.Results);918 FastAssign(RPCBrokerV.Results, Dest); 905 919 end; 906 920 … … 931 945 end; 932 946 MixedCaseList(RPCBrokerV.Results); 933 Dest.Assign(RPCBrokerV.Results);947 FastAssign(RPCBrokerV.Results, Dest); 934 948 end; 935 949 … … 939 953 CallV('ORWPT TOP', [nil]); 940 954 MixedCaseList(RPCBrokerV.Results); 941 Dest.Assign(RPCBrokerV.Results);955 FastAssign(RPCBrokerV.Results, Dest); 942 956 end; 943 957 … … 1045 1059 1046 1060 function GetPtIDInfo(const DFN: string): TPtIDInfo; //*DFN* 1047 { returns the identifiers displayed upon patient selection1048 1061 //VWPT ADD HRN ,ALT HRN (FUTURE) 1049 Pieces: SSN[1]^DOB[2]^SEX[3]^VET[4]^SC%[5]^WARD[6]^RM-BED[7]^NAME[8]^HRN[9]^ALTHRN[10] }1062 // Pieces: SSN[1]^DOB[2]^SEX[3]^VET[4]^SC%[5]^WARD[6]^RM-BED[7]^NAME[8]^HRN[9]^ALTHRN[10] } 1050 1063 // Pieces: SSN[1]^DOB[2]^SEX[3]^VET[4]^SC%[5]^WARD[6]^RM-BED[7]^NAME[8] } 1051 1064 var … … 1125 1138 //VWPT add HRN and ALTERNATE HRN used with PID hl7 segments 1126 1139 ADMITTIME[10]^CONVERTED[11]^SVCONN[12]^SC%[13]^ICN[14]^Age[15]^TreatSpec[16]^HRN[17]^AltHRN[18] } 1127 // BEFORE THIS VWPT WAS ADMITTIME[10]^CONVERTED[11]^SVCONN[12]^SC%[13]^ICN[14]^Age[15]^TreatSpec[16] }1140 // BEFORE THIS VWPT WAS ADMITTIME[10]^CONVERTED[11]^SVCONN[12]^SC%[13]^ICN[14]^Age[15]^TreatSpec[16] } 1128 1141 var 1129 1142 x: string; … … 1148 1161 ServiceConnected := Piece(x, U, 12) = '1'; 1149 1162 SCPercent := StrToIntDef(Piece(x, U, 13), 0); 1150 1151 1163 //VWPT ADD HRN AltHRN (future) 1152 1164 HRN := Piece(x, U, 17); … … 1229 1241 MixedCaseList(Results); 1230 1242 SetListFMDateTime('mmm dd,yyyy hh:nn', TStringList(Results), U, 2); 1231 Dest.Assign(Results);1243 FastAssign(Results, Dest); 1232 1244 end; 1233 1245 (* … … 1245 1257 Results[i] := x; 1246 1258 end; 1247 Dest.Assign(Results);1259 FastAssign(Results, Dest); 1248 1260 end; 1249 1261 *) … … 1267 1279 Results[i] := x; 1268 1280 end; 1269 Dest.Assign(Results);1281 FastAssign(Results, Dest); 1270 1282 end; 1271 1283 end; … … 1301 1313 begin 1302 1314 CallV('ORWCIRN FACLIST', [DFN]); 1303 ALocations.Assign(RPCBrokerV.Results);1315 FastAssign(RPCBrokerV.Results, ALocations); 1304 1316 Result := not (Piece(RPCBrokerV.Results[0], U, 1) = '-1'); 1305 1317 … … 1320 1332 end; 1321 1333 1322 function UseVistaWeb: Boolean;1323 begin;1324 CallV('ORWCIRN VISTAWEB',[nil]);1325 result := RPCBrokerV.Results[0] = '1';1326 end;1327 1328 1334 function GetVistaWebAddress(value: string): string; 1329 1335 begin … … 1332 1338 end; 1333 1339 1334 procedure ChangeVistaWebParam(value: string);1335 begin1336 CallV('ORWCIRN WEBCH',[value]);1337 end;1338 1339 1340 function GetDefaultPrinter(DUZ: Int64; Location: integer): string; 1340 1341 begin … … 1342 1343 end; 1343 1344 1344 initialization1345 uFMToday := 0;1346 1347 1345 end.
Note:
See TracChangeset
for help on using the changeset viewer.