BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: Knott ที่ กันยายน 07, 2023, 13:19:46 PM
-
สอบถามครับ เราสามารถทำการล็อคการจ่ายยา หรือ pop up เตือน ที่หน้าจอหมอเมื่อหมอคีจ่ายยา Metformin จ่ายคนไข้ ที่มีผลแลป eGFR < 30 มั้ยครับ
มีวิธีไหน หรือทำอย่างไรได้บ้างครับ
-
ใน SYN_VN_SCRIPT
count icode ของยา metformin ใน opitemrece
ถ้า >=1 ให้ดึงค่า eGFR มาเช็คดูว่า <45 หรือไม่
ถ้า <45 เช็คดูว่า usage เป็น usage หรือ sp_usage
usage -> ต้องเป็น 1x2 หรือ 1x1
sp_usage -> ห้ามใช้ หรือถ้าจะใช้ให้ไป เขียน function regEx ถอดข้อความอีกไม่ได้เกิน 1000 mg/day
-> แจ้งเตือนอะไรก็ว่าไป
ถ้า <30 ขึ้น popup ให้ติ๊ก check box แล้วกดปุ่มยืนยัน ถ้าไม่ติ๊กให้ลบรายการ icode นั้นออกหรือ update จำนวนเป็น 0
-
ลองแกะดูครับ
เปลี่ยน icode ของ Metformin และ lo.lab_items_code ของ eGFR ให้ตรงกับของโรงพยาบาล
เปลี่ยน drugusage เป็นวิธีใช้ที่ไม่เกิน 1000 mg/day
SYS_VN_SCRIPT
var
vn,hn: string;
lasteGFR: Double;
isMetforminOrder, isWrongMetforminUsageDose: Boolean;
begin
vn := GetGlobalValue('VN');
//vn := '671113080230';
hn := getsqldata('select hn from vn_stat where vn="' + vn + '"');
//******** metformin popup ******
isMetforminOrder := StrToInt(getsqldata('SELECT COUNT(*) FROM opitemrece o WHERE o.vn = "' + vn + '" ' +
'AND o.icode = ''1000210'' AND o.qty > 0')) > 0;
lasteGFR := getsqldata('SELECT lo.lab_order_result ' +
'FROM lab_head lh ' +
'INNER JOIN lab_order lo ON lh.lab_order_number = lo.lab_order_number ' +
'WHERE lh.hn = "' + hn + '" ' +
'AND lo.lab_items_code = "660" ' +
'AND lo.lab_order_result > 0 ' +
'AND lo.lab_order_result REGEXP ''^[0-9]+\.?[0-9]*$'' ' +
'ORDER BY lh.report_date DESC LIMIT 1');
isWrongMetforminUsageDose := StrToInt(getsqldata('SELECT COUNT(*) FROM opitemrece o WHERE o.vn = "' + vn + '" ' +
'AND o.icode = ''1000210'' AND o.qty > 0 ' +
'AND o.drugusage NOT IN (''0002172'', ''0011'', ''0014'', ''0022'', ''0033'', ''0154'', ''0168'', ''0321'', ''0336'')')) > 0;
//showmessage(isWrongMetforminUsageDose);
//showmessage(lasteGFR);
try
if (isMetforminOrder and (StrToFloat(lasteGFR) > 0) and (StrToFloat(lasteGFR) < 30)) or
(isMetforminOrder and (StrToFloat(lasteGFR) > 30) and (StrToFloat(lasteGFR) < 45) and isWrongMetforminUsageDose) then
begin
runHOSxP_ScriptProgram('Drugblocker');
end;
except
on E: EConvertError do
showmessage('Invalid GFR value');
end;
//***************************
end;
-
Drugblocker
unit DB;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ActnList, DBCtrls, dblookup, DB, DBClient, Grids,
DBGrids, SQLDB;
type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
Button1: TButton;
Button2: TButton;
HeadLabel: TLabel;
hnLabel: TLabel;
hntxt: TLabel;
pdxLabel: TLabel;
Label1: TLabel;
Shape1: TShape;
Label8: TLabel;
Label9: TLabel;
fullnametxt: TLabel;
Label13: TLabel;
pttypetxt: TLabel;
Panel1: TPanel;
currentlabel: TLabel;
Panel3: TPanel;
Year: TLabel;
age_yLabel: TLabel;
ListBox2: TListBox;
Shape2: TShape;
cds: TClientDataSet;
ds: TDataSource;
cds2: TClientDataSet;
ds2: TDataSource;
cds3: TClientDataSet;
ds3: TDataSource;
cds4: TClientDataSet;
TempCDS: TClientDataSet;
reclabel1: TLabel;
reclabel2: TLabel;
reclabel3: TLabel;
reclabel4: TLabel;
procedure showdata(Sender: TObject);
procedure LoadPatientData(vn: string);
function getVN: string;
function getAN: string;
function getHN: string;
procedure FormCreate(Sender: TObject);
procedure btnConfirmClick(Sender: TObject);
private
procedure DisplayPatientInfo(hn, fullname, pttype: string; age_y: Integer);
procedure LoadLabData(hn: string);
procedure LoadPrescriptionData(vn: string);
procedure DeleteRecord(const RecordID: string);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
// GetVN retrieves the VN (visit number) or uses a default if none is found.
function TForm1.getVN: string;
begin
Result := GetGlobalValue('VN');// Uncomment if GetGlobalValue is available
//if Result = '' then
//Result := '661130062500'; // Default VN
//Result := '671107054724'; // Default VN }
end;
function TForm1.getAN: string;
begin
Result := GetGlobalValue('AN');// Uncomment if GetGlobalValue is available
end;
function TForm1.isAdmit: Boolean;
begin
Result := (getAN <> '');
end;
function getHN: string;
begin
Result := getsqldata('SELECT hn FROM vn_stat WHERE vn="' + getVN + '"');
end;
// Display patient information on the form.
procedure TForm1.DisplayPatientInfo(hn, fullname, pttype: string; age_y: Integer);
begin
hntxt.Caption := hn;
fullnametxt.Caption := fullname;
pttypetxt.Caption := pttype;
age_yLabel.Caption := IntToStr(age_y);
end;
procedure TForm1.recordOpen(Sender: TObject);
var
tc0, tc1: TClientDataSet;
universal_head_id, universal_detail_id,onlineid,user: string;
nextDetailID, i: Integer;
begin
// Record universal head
onlineid:=get_onlineid;
user := getsqldata('select kskloginname from onlineuser where onlineid="'+onlineid+'"');
//showmessage(user);
tc0 := TClientDataSet.Create(nil);
//if user = 'isarak' then
// Exit;
try
// Get a new universal_head_id
universal_head_id := getsqldata('SELECT COALESCE(MAX(universal_head_id), 0) + 1 FROM universal_head');
tc0.Data := hosxp_getdataset('SELECT * FROM universal_head');
tc0.Open;
// Insert the new head record
tc0.Insert;
tc0.FieldByName('universal_head_id').AsString := universal_head_id;
tc0.FieldByName('entry_date').AsDateTime := Now;
tc0.FieldByName('staff').AsString := user;
tc0.FieldByName('hn').AsString := getHN;
tc0.FieldByName('vn').AsString := GetVN;
tc0.FieldByName('universal_form_id').AsString := '53';
tc0.FieldByName('entry_time').AsDateTime := Time;
tc0.Post;
// Save changes to the database if any were made
if tc0.ChangeCount > 0 then
hosxp_updatedelta(tc0.Delta, 'SELECT * FROM universal_head');
except
on E: Exception do
ShowMessage('Error recording universal head: ' + E.Message);
end;
tc0.Free;
end;
// LoadPatientData retrieves and displays patient information based on the VN.
procedure TForm1.LoadPatientData(vn: string);
var
hn, fullname, pttype, age_y_str: string;
age_y, sex: Integer;
begin
try
hn := getsqldata('SELECT hn FROM vn_stat WHERE vn = "' + vn + '"');
fullname := getsqldata('SELECT CONCAT(pname, fname, " ", lname) FROM patient WHERE hn = "' + hn + '"');
sex := StrToInt(getsqldata('SELECT sex FROM patient WHERE hn = "' + hn + '"'));
pttype := getsqldata('SELECT p.name FROM opitemrece o INNER JOIN pttype p ON o.pttype = p.pttype WHERE vn = "' + vn + '"');
age_y_str := getsqldata('SELECT age_y FROM vn_stat WHERE vn = "' + vn + '"');
age_y := StrToInt(age_y_str);
pdxLabel.Caption := getsqldata('SELECT CONCAT(vs.pdx, " : ", i.name) FROM vn_stat vs INNER JOIN icd101 i ON vs.pdx = i.code WHERE vn = "' + vn + '"');
DisplayPatientInfo(hn, fullname, pttype, age_y);
except
on E: Exception do
ShowMessage('Error loading patient data: ' + E.Message);
end;
end;
// Load lab data into cds.
procedure TForm1.LoadLabData(hn: string);
begin
cds.Data := hosxp_getdataset(
'SELECT DATE_FORMAT(DATE_ADD(lh.report_date, INTERVAL 543 YEAR), ''%d/%m/%Y'') AS report_date, ' +
'lh.vn, lh.hn, os.bw AS weight, vs.age_y AS age, vs.sex, ' +
'MAX(CASE WHEN lo.lab_items_code = ''231'' THEN lo.lab_order_result END) AS Creatinine, ' +
'MAX(CASE WHEN lo.lab_items_code = ''660'' THEN lo.lab_order_result END) AS eGFR, ' +
'CASE WHEN os.bw IS NULL OR os.bw = 0 OR os.bw > 150 THEN ''-'' ' +
'WHEN vs.sex = ''1'' THEN ROUND(((140 - vs.age_y) * os.bw) / (72 * NULLIF(MAX(CASE WHEN lo.lab_items_code = ''231'' THEN lo.lab_order_result END), 0)), 2) ' +
'WHEN vs.sex = ''2'' THEN ROUND(0.85 * ((140 - vs.age_y) * os.bw) / (72 * NULLIF(MAX(CASE WHEN lo.lab_items_code = ''231'' THEN lo.lab_order_result END), 0)), 2) ' +
'END AS CrCl ' +
'FROM lab_head lh ' +
'INNER JOIN lab_order lo ON lh.lab_order_number = lo.lab_order_number ' +
'INNER JOIN opdscreen os ON lh.vn = os.vn ' +
'INNER JOIN vn_stat vs ON lh.vn = vs.vn ' +
'WHERE lh.hn = "' + hn + '" ' +
'AND lo.lab_items_code IN (''231'', ''660'') AND lo.lab_order_result > 0 ' +
'AND lo.lab_order_result REGEXP ''^[0-9]+\.?[0-9]*$'' ' +
'GROUP BY lh.report_date, lh.vn, lh.hn, os.bw, vs.age_y, vs.sex ' +
'ORDER BY lh.report_date DESC LIMIT 5'
);
end;
// Load prescription data into cds2.
procedure TForm1.LoadPrescriptionData(vn: string);
begin
cds2.Data := hosxp_getdataset(
'SELECT o.hos_guid,o.vstdate, CONCAT(d.name, " ", d.strength) AS name, o.icode, ' +
'COALESCE(du.code, CONCAT(su.name1, su.name2, su.name3)) AS usage_or_sp_usage, o.qty ' +
'FROM opitemrece o ' +
'INNER JOIN drugitems d ON o.icode = d.icode ' +
'LEFT OUTER JOIN drugusage du ON o.drugusage = du.drugusage ' +
'LEFT OUTER JOIN sp_use su ON o.sp_use = su.sp_use ' +
'WHERE o.vn = "' + vn + '" AND o.icode = "1000210"'
);
end;
procedure TForm1.UpdateCheckboxVisibility(LatestEGFR: Double);
begin
if LatestEGFR < 30 then
begin
// Show Checkfordelete and Checkforconfirm, hide other checkboxes
Checkfordelete.Visible := True;
Checkforconfirm.Visible := True;
Checkforconfirm.Top := 25;
Checkhalfx1.Visible := False;
Check1x1.Visible := False;
Check1x2.Visible := False;
Check2x1.Visible := False;
Check110.Visible := False;
end
else if (LatestEGFR >= 30 and LatestEGFR <= 45) then
begin
// Hide Checkfordelete and Checkforconfirm, show other checkboxes
Checkfordelete.Visible := False;
Checkforconfirm.Visible := true;
Checkhalfx1.Visible := True;
Checkhalfx1.Top := 5;
Check1x1.Top := 25;
Check1x2.Top := 45;
Check2x1.Top := 65;
Check110.Top := 85;
Checkforconfirm.Top := 105;
Check1x1.Visible := True;
Check1x2.Visible := True;
Check2x1.Visible := True;
Check110.Visible := True;
end
else
begin
If LatestEGFR = '' then
Checkfordelete.Visible := False;
Checkforconfirm.Visible := False;
Checkhalfx1.Visible := False;
Check1x1.Visible := False;
Check1x2.Visible := False;
Check2x1.Visible := False;
Check110.Visible := False;
end;
end;
procedure TForm1.showdata(Sender: TObject);
var
vn, hn: string;
LatestEGFR: Double;
begin
vn := GetVN;
LoadPatientData(vn);
hn := getsqldata('SELECT hn FROM vn_stat WHERE vn = "' + vn + '"');
try
LoadLabData(hn);
LoadPrescriptionData(vn);
recordOpen(Sender);
// Calculate LatestEGFR based on loaded lab data
if cds.RecordCount > 0 then
begin
cds.First; // Ensure the dataset is on the first record
LatestEGFR := cds.FieldByName('eGFR').AsFloat;
UpdateCheckboxVisibility(LatestEGFR); // Call the procedure to update checkbox visibility
end;
except
on E: Exception do
ShowMessage('Error loading dataset: ' + E.Message);
end;
end;
// DeleteRecord deletes a specific record from cds2.
procedure TForm1.DeleteRecord(const RecordID: string);
var
vn: string;
begin
vn := GetVN;
// Load datasets
cds3.Data := hosxp_getdataset('SELECT * FROM opitemrece o WHERE o.vn = "' + vn + '"');
cds4.Data := hosxp_getdataset('SELECT * FROM opitemrece_summary o WHERE o.vn = "' + vn + '"');
// Delete from cds3
cds3.First;
while not cds3.Eof do
begin
if cds3.FieldByName('icode').AsString = RecordID then
begin
cds3.Delete;
Break;
end;
cds3.Next;
end;
// Delete from cds4
cds4.First;
while not cds4.Eof do
begin
if cds4.FieldByName('icode').AsString = RecordID then
begin
cds4.Delete;
Break;
end;
cds4.Next;
end;
// Apply changes if any record was deleted
if (cds3.ChangeCount > 0) or (cds4.ChangeCount > 0) then
begin
// Apply changes to both cds3 and cds4
hosxp_updatedelta(cds3.Delta, 'SELECT * FROM opitemrece o WHERE o.vn = "' + vn + '"');
hosxp_updatedelta(cds4.Delta, 'SELECT * FROM opitemrece_summary o WHERE o.vn = "' + vn + '"');
ShowMessage('Record deleted successfully.');
end
else
ShowMessage('Record not found or no changes to apply.');
end;
procedure TForm1.UpdateRecord(const drugusage: string);
var
vn: string;
begin
vn := GetVN;
cds3.Data := hosxp_getdataset('SELECT * FROM opitemrece o WHERE o.vn = "' + vn + '" and o.icode = "1000210"');
cds3.First;
while not cds3.Eof do
begin
// Update the drugusage field to the specified value if found
cds3.Edit;
cds3.FieldByName('drugusage').AsString := drugusage;
cds3.Post;
Break;
end;
// Check if there are changes and apply them to the database
if cds3.ChangeCount > 0 then
begin
hosxp_updatedelta(cds3.Delta, 'SELECT * FROM opitemrece o WHERE o.vn = "' + vn + '" ');
//ShowMessage('Record updated successfully.');
end
else
ShowMessage('Record not found or no changes to apply.');
end;
procedure TForm1.btnConfirmClick(Sender: TObject);
var
CheckedCount: Integer;
begin
CheckedCount := 0;
// Count the number of checked boxes
if Checkhalfx1.Checked then CheckedCount := CheckedCount + 1;
if Check1x1.Checked then CheckedCount := CheckedCount + 1;
if Check1x2.Checked then CheckedCount := CheckedCount + 1;
if Check2x1.Checked then CheckedCount := CheckedCount + 1;
if Check110.Checked then CheckedCount := CheckedCount + 1;
if Checkfordelete.Checked then CheckedCount := CheckedCount + 1;
if Checkforconfirm.Checked then CheckedCount := CheckedCount + 1;
// If no checkboxes or more than one are checked, show a message and exit
if CheckedCount = 0 then
begin
ShowMessage('Please select one option to confirm.');
Exit;
end
else if CheckedCount > 1 then
begin
ShowMessage('Please select only one option to confirm.');
Exit;
end;
// If only one checkbox is selected, perform the appropriate action
try
if Checkhalfx1.Checked then
UpdateRecord('0168')
else if Check1x1.Checked then
UpdateRecord('0011')
else if Check1x2.Checked then
UpdateRecord('0022')
else if Check2x1.Checked then
UpdateRecord('0154')
else if Check110.Checked then
UpdateRecord('0317')
else if Checkfordelete.Checked then
DeleteRecord('1000210')
else if Checkforconfirm.Checked then
Close; // Close the form if Checkforconfirm is checked
Close; // Close the form after action
except
on E: Exception do
ShowMessage('Error confirming action: ' + E.Message);
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
// Free resources like datasets and other allocated objects
cds.Close;
cds2.Close;
cds3.Close;
cds4.Close;
// Set the form to be released from memory
Action := caFree;
end;
end.
procedure TForm1.DeleteRecord(const RecordID: string);
procedure TForm1.UpdateRecord(const drugusage: string);
ฝาก recheck 2 procedure นี้ด้วยครับ ผมไม่มั่นใจว่าเวลาลบรายการ แก้ไขวิธีใช้ต้องอัพเดตตารางไหนบ้าง ไม่ได้ trace sql ของ HOSxP ดูครับ
-
DFM
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Drug prescription blocker)'
ClientHeight =550
ClientWidth = 700
Color = clWindow
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnShow = showdata
PixelsPerInch = 96
TextHeight = 13
Position = poScreenCenter
object Panel1: TPanel
Left = 0
Top = 0
Width = 700
Height = 50
Align = alTop
TabOrder = 1
BevelInner = bvNone
BevelOuter = bvNone
object Shape1: TShape
Left = 0
Top = 0
Width = 700
Height = 50
Brush.Color = $4763FF
Pen.Style = psClear
end
object HeadLabel: TLabel
Left = 270
Top = 15
Width = 100
Height = 25
Caption = 'ALERT:METFORMIN'
Alignment = taCenter
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -20
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
end
object Panel2: TPanel
Left = 0
Top = 50
Width = 700
Height = 50
Align = alTop
BevelInner = bvNone
BevelOuter = bvNone
TabOrder = 1
object hnLabel: TLabel
Left = 25
Top = 5
Width = 16
Height = 16
Caption = 'HN'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object hntxt: TLabel
Left = 55
Top = 5
Width = 14
Height = 16
Caption = 'hn'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label2: TLabel
Left = 168
Top = 5
Width = 70
Height = 16
Caption = 'ª×èÍ-Ê¡ØÅ'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object fullnametxt: TLabel
Left = 230
Top = 5
Width = 49
Height = 16
Caption = 'Fullname'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label3: TLabel
Left = 400
Top = 5
Width = 35
Height = 16
Caption = 'ÍÒÂØ'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Year: TLabel
Left = 450
Top = 5
Width = 22
Height = 16
Caption = '»Õ'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object age_yLabel: TLabel
Left = 430
Top = 5
Width = 22
Height = 16
Caption = 'Years'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label13: TLabel
Left = 500
Top = 5
Width = 100
Height = 16
Caption = 'ÊÔ·¸Ô¡ÒÃÃÑ¡ÉÒ'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object pttypetxt: TLabel
Left = 580
Top = 5
Width = 50
Height = 16
Caption = 'Pttype'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label4: TLabel
Left = 25
Top = 25
Width = 54
Height = 16
Caption = 'Diagnosis'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object pdxLabel: TLabel
Left = 100
Top = 25
Width = 20
Height = 16
Caption = 'pdx'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label9: TLabel
Left = 400
Top = 25
Width = 108
Height = 16
Caption = ''
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
end
object Panel3: TPanel
Left = 0
Top = 50
Width = 300
Height = 135
Align = alTop
TabOrder = 1
BevelInner = bvNone
BevelOuter = bvNone
object label11: TLabel
Left = 25
Top = 0
Width = 100
Height = 16
Caption = '¤èÒ·Ò§Ëéͧ»¯ÔºÑµÔ¡ÒÃ'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object cxGrid2: TcxGrid
Left = 25
Top = 25
Width = 655
Height = 130
TabOrder = 6
LookAndFeel.Kind = lfOffice11
object cxGrid2DBTableView1: TcxGridDBTableView
DataController.DataSource = ds
NavigatorButtons.ConfirmDelete = False
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsData.CancelOnExit = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsData.Editing = False
OptionsData.Inserting = False
OptionsSelection.CellSelect = False
OptionsView.CellAutoHeight = True
OptionsView.ColumnAutoWidth = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object cxGrid2DBTableView1report_date: TcxGridDBColumn
Caption = 'Çѹ·ÕèÃÒ§ҹ'
DataBinding.FieldName = 'report_date'
Width = 70
end
object cxGrid2DBTableView1creatinine: TcxGridDBColumn
Caption = 'Creatinine'
DataBinding.FieldName = 'creatinine'
Width = 70
end
object cxGrid2DBTableView1eGFR: TcxGridDBColumn
Caption = 'eGFR'
DataBinding.FieldName = 'eGFR'
Width = 70
end
object cxGrid2DBTableView1CrCl: TcxGridDBColumn
Caption = 'CrCl'
DataBinding.FieldName = 'crcl'
Width = 70
end
end
object cxGrid2Level1: TcxGridLevel
GridView = cxGrid2DBTableView1
end
end
end
object Panel4: TPanel
Left = 0
Top = 50
Width = 300
Height = 100
Align = alTop
TabOrder = 1
BevelInner = bvNone
BevelOuter = bvNone
object label12: TLabel
Left = 25
Top = 5
Width = 100
Height = 16
Caption = 'ÂÒ·ÕèÊÑè§ãªé»Ñ¨¨ØºÑ¹'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object cxGrid3: TcxGrid
Left = 25
Top = 25
Width = 655
Height = 75
TabOrder = 6
LookAndFeel.Kind = lfOffice11
object cxGrid3DBTableView1: TcxGridDBTableView
DataController.DataSource = ds2
NavigatorButtons.ConfirmDelete = False
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsData.CancelOnExit = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsData.Editing = False
OptionsData.Inserting = False
OptionsSelection.CellSelect = False
OptionsView.CellAutoHeight = True
OptionsView.ColumnAutoWidth = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object cxGrid3DBTableView1report_date: TcxGridDBColumn
Caption = 'Çѹ·ÕèÊÑè§ãªé'
DataBinding.FieldName = 'vstdate'
Width = 70
end
object cxGrid3DBTableView1creatinine: TcxGridDBColumn
Caption = 'ª×èÍÂÒ'
DataBinding.FieldName = 'name'
Width = 70
end
object cxGrid3DBTableView1eGFR: TcxGridDBColumn
Caption = 'ÇÔ¸Õãªé'
DataBinding.FieldName = 'usage_or_sp_usage'
Width = 70
end
object cxGrid3DBTableView1CrCl: TcxGridDBColumn
Caption = '¨Ó¹Ç¹'
DataBinding.FieldName = 'qty'
Width = 70
end
end
object cxGrid3Level1: TcxGridLevel
GridView = cxGrid3DBTableView1
end
end
end
object Panel10: TPanel
Left = 0
Top = 50
Width = 300
Height = 250
Align = alTop
TabOrder = 1
BevelInner = bvNone
BevelOuter = bvNone
object Checkfordelete: TcxCheckBox
Left = 150
Top = 5
Caption = ' ËéÒÁÊÑè§ãªé eGFR < 30 (àÅ×Í¡à¾×èÍźÃÒ¡ÒÃÂÒ)'
TabOrder = 1
Transparent = True
Width = 400
end
object Checkhalfx1: TcxCheckBox
Left = 150
Top = 25
Caption = ' .51pt ( 1/2 àÁç´ x1 PC) '
TabOrder = 2
Transparent = True
Width = 400
Visible = False
end
object Check1x1: TcxCheckBox
Left = 150
Top = 45
Caption = ' 11pt (1 àÁç´ x 1 PC àªéÒ)'
TabOrder = 3
Transparent = True
Width = 400
Visible = False
end
object Check1x2: TcxCheckBox
Left = 150
Top = 65
Caption = ' 12pt (1 àÁç´ x 2 PC àªéÒ-àÂç¹)'
TabOrder = 4
Transparent = True
Width = 400
Visible = False
end
object Check2x1: TcxCheckBox
Left = 150
Top = 85
Caption = ' 21pt (2 àÁç´ x 1 PC)'
TabOrder = 5
Transparent = True
Width = 400
Visible = False
end
object Check110: TcxCheckBox
Left = 150
Top = 105
Caption = ' 12pt ª· (1 àÁç´ x 2 PC àªéÒ-à·Õè§)'
TabOrder = 6
Transparent = True
Width = 400
Visible = False
end
object Checkforconfirm: TcxCheckBox
Left = 150
Top = 125
Caption = ' Â×¹Âѹ¡ÒÃÊÑè§ãªé'
TabOrder = 7
Transparent = True
Width = 400
end
object reclabel: TLabel
Left = 25
Top = 5
Width = 100
Height = 16
Caption = '¢¹Ò´ÂÒ'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object btnConfirm: TButton
Left = 550
Top = 120
Width = 100
Height = 30
Caption = 'ºÑ¹·Ö¡'
TabOrder = 50
OnClick = btnConfirmClick
end
end
object Panel6: TPanel
Left = 0
Top = 200
Width = 300
Height = 300
Align = alTop
TabOrder = 1
BevelInner = bvNone
BevelOuter = bvNone
object reclabel4: TLabel
Left = 25
Top = 5
Width = 100
Height = 16
Caption = ''
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object btnDelete: TButton
Left = 550
Top = 50
Width = 100
Height = 30
Caption = 'źÃÒ¡ÒÃÂÒ'
TabOrder = 3
OnClick = btnDeleteClick
end
end
object cds: TClientDataSet
Aggregates = <>
Params = <>
Left = 39
Top = 6
end
object ds: TDataSource
DataSet = cds
Left = 78
Top = 6
end
object cds3: TClientDataSet
Aggregates = <>
Params = <>
Left = 39
Top = 6
end
object ds3: TDataSource
DataSet = cds3
Left = 78
Top = 6
end
object cds2: TClientDataSet
Aggregates = <>
Params = <>
Left = 39
Top = 6
end
object ds2: TDataSource
DataSet = cds2
Left = 78
Top = 6
end
object TempCDS: TClientDataSet
Aggregates = <>
Params = <>
Left = 39
Top = 6
end
end
-
GUI (DFM) ของ script เราสามารถใช้ IDE ของ delphi ช่วยเรื่องความสวยงามได้ครับ มีหลาย component ที่ใช้ได้เช่น table, list, group box, tab, label ฯลฯ แต่ก็ไม่ได้ทั้งหมด .... เราสร้างด้วย IDE แล้ว copy มาใส่ลงใน DFM ของ script ได้
-
HOSxP XE ทำได้ไหมครับแบบนี้
-
HOSxP XE ทำได้ไหมครับแบบนี้
ได้ครับ ตั้งค่าที่เมนู drug lab interaction ครับ
-
ในส่วนของ universal_head หรือใน UE from ให้แสดงผลออกมาอย่างไรครับ