Constructor

TPLUserParams.Create

Module

uProbs

Last Modified

7/15/2014 3:26:44 PM

Comments

-------------------- TUserParams -------------------------------

Visibility

Public/Published

Owner

TPLUserParams

Declaration

constructor Create(alist:TstringList);

Called-By Hierarchy


                         TPLUserParams.Create
                      TfrmPCELex.FormCreate┤ 
                TfrmProblems.LoadUserParams┘ 
                TfrmProblems.LoadProblems┘   
               TfrmProblems.DisplayPage┤     
TfrmProblems.mnuViewRestoreDefaultClick┤     
                  TfrmProblems.FormShow┘     

Called-By

Name Declaration Comments
TfrmPCELex.FormCreate procedure FormCreate(Sender: TObject); -
TfrmProblems.LoadUserParams procedure LoadUserParams(Alist:TstringList); -


Source

414   constructor TPLUserParams.create(alist:TstringList);
415   var
416     p:string;
417     i:integer;
418   begin
419     usPrimeUser           := false;
420     usDefaultView         := '';
421     usVerifyTranscribed   := True;   // SHOULD DEFAULT BE FALSE???
422     usPromptforCopy       := false;
423     usUseLexicon          := false;
424     usReverseChronDisplay := true;
425     usViewAct             := 'A';
426     usViewProv            := '0^All';
427     usService             := '';
428     usViewcomments        := '0';
429     usClinList            := TstringList.create;
430     usServList            := TstringList.create;
431     if alist.count=0 then exit;  {BAIL OUT IF LIST EMPTY}
432     //usPrimeUser           := False;  {for testing}
433     usPrimeUser           := (alist[0]='1');
434     usDefaultView         := alist[1];
435     if usDefaultView = '' then
436       begin
437         if Patient.Inpatient then usDefaultView := PL_IP_VIEW
438         else usDefaultView := PL_OP_VIEW;
439       end;
440     usVerifyTranscribed   := (alist[2]='1');
441     usPromptforCopy       := (alist[3]='1');
442     //usUseLexicon          := False;  {for testing}
443     usUseLexicon          := (alist[4]='1');
444     usReverseChronDisplay := (alist[5]='1');
445     usViewAct             := alist[6];
446     usViewProv            := alist[7];
447     usService             := alist[8];
448     usViewServ            := alist[9];
449     usViewClin            := alist[10];
450     usTesting             := (alist[11]<>'');
451     usViewComments        := AList[12];
452     usSuppressCodes       := (Alist[13]='1');
453     usCurrentView         := usDefaultView;
454     usDefaultContext      := ';;' + usViewAct + ';' + usViewComments + ';' + Piece(usViewProv, U, 1);
455     if usViewClin <> '' then
456       begin
457         i := 1;
458         repeat
459           begin
460             p := Piece(usViewClin,'/',i);
461             inc(i);
462             if p <> '' then usClinList.add(p);
463           end;
464         until p = '';
465       end;
466     if usViewServ <> '' then
467       begin
468         i := 1;
469         repeat
470           begin
471             p := Piece(usViewServ,'/',i);
472             inc(i);
473             if p <> '' then usServList.add(p);
474           end;
475         until p = '';
476       end;
477   end;