You are on page 1of 4

Latihan SOAL Semester IV(Empat)

Program Studi D III – Rekam Medis & Informasi Kesehatan

1. Buat project baru dengan nama proj_klinik dan buat database dengan nama klinik_db dan dan didalam
klinik_db buat table baru dengan nama klinik. Isikan table dengan field - field berikut ini :

2. Design Form (disimpan dgn nama klinik24jam)


Listing Program Form1 bersih
thisform.txtno_rm.Value=""
Form1 aktivate thisform.txtnm_pasien.Value=""
thisform.noaktif thisform.txtalamat.Value=""
thisform.txtb_reg.Value=0
Form1 Load thisform.txtb_tin.Value=0
CLOSE INDEXES thisform.txtcari.Value=""
CLOSE DATABASES thisform.txttotal.Value=0
USE tb_klinik thisform.txtubay.Value=0
SET ORDER TO tag no_rm thisform.txtukem.Value=0
*thisform.txtjam.Value=""
Form1 aktif thisform.txttgl.Value=""
thisform.txtno_rm.Enabled= .T. thisform.cbO_DOK.Value=""
thisform.txtalamat.Enabled= .T. thisform.cbo_tin.Value=""
thisform.txtnm_pasien.Enabled= .T.
thisform.txtcari.Enabled= .T. Form1 tampil
thisform.txtb_reg.Enabled= .T. thisform.txtno_rm.Value=no_rm
thisform.txtb_tin.Enabled= .T. thisform.txtnm_pasien.Value=nm_pasien
thisform.txttotal.Enabled= .T. thisform.txtalamat.Value=alamat
thisform.txtubay.Enabled= .T. thisform.txtb_reg.Value=b_registrasi
thisform.txtukem.Enabled= .T. thisform.txtb_tin.Value=b_tindakan
thisform.cbO_DOK.Enabled= .T. thisform.txttotal.Value=total
thisform.cbO_tin.Enabled= .T. thisform.txtubay.Value=ubay
thisform.optiongroup1.Enabled= .T. thisform.txtukem.Value=ukem
thisform.cmdcari.Enabled= .T. thisform.txttgl.Value=tgl
thisform.cmdsave.Enabled= .T. thisform.cbo_dok.Value=nm_dokter
thisform.cmdadd.Enabled= .T. thisform.cbo_tin.Value=tindakan
thisform.cmdclose.Enabled= .T. IF thisform.optiongroup1.option1.Value=1
thisform.cmdbrowse.Enabled= .T. thisform.optiongroup1.option2.Value=0
thisform.cmddelete.Enabled= .T.
ELSE
thisform.optiongroup1.option1.Value=0
Form1 noaktif thisform.optiongroup1.option2.Value=1
thisform.txtno_rm.Enabled= .F. ENDIF
thisform.txtalamat.Enabled= .F.
thisform.txtnm_pasien.Enabled= .F.
Timer` timer
thisform.txtcari.Enabled= .t. *thisform.txtjam.Value=TIME()
thisform.txtb_reg.Enabled= .F. thisform.txttgl.Value=DATE()
thisform.txtb_tin.Enabled= .F. IF thisform.label1.Visible= .F.
thisform.txttotal.Enabled= .F. thisform.label1.Visible= .T.
thisform.txtubay.Enabled= .F. ELSE
thisform.txtukem.Enabled= .F.
thisform.label1.Visible= .F.
thisform.cbO_DOK.Enabled= .F. endif
thisform.cbO_tin.Enabled= .F.
thisform.optiongroup1.Enabled= .F.
thisform.cmdcari.Enabled= .T.
thisform.cmdsave.Enabled= .F.
thisform.cmdadd.Enabled= .T.
thisform.cmdclose.Enabled= .T.
thisform.cmdbrowse.Enabled= .t.
thisform.cmddelete.Enabled= .F.

optiongroup1 Click
IF thisform.optiongroup1.option1.Value=1
thisform.cbO_DOK.Clear
thisform.cbO_DOK.AddItem("dr.Santi Sabila")
thisform.cbO_DOK.AddItem("dr.Eko Bambang")
thisform.cbO_tin.Clear
thisform.cbO_tin.AddItem("KB")
thisform.cbO_tin.AddItem("CHECK UP")
ELSE
thisform.cbO_DOK.Clear
thisform.cbO_DOK.AddItem("dr.Heri Batara")
thisform.cbO_DOK.AddItem("dr.Melisa Utami")
thisform.cbO_tin.Clear
thisform.cbO_tin.AddItem("CABUT GIGI")
thisform.cbO_tin.AddItem("TAMBAL GIGI")
ENDIF
Cbo_tin Click
IF thisform.cbo_tin.Value="KB" Cmdadd
thisform.txtb_tin.Value=30000
ELSE Click thisform.aktif
IF thisform.cbo_tin.Value="CHECK UP" thisform.bersih
thisform.txtb_tin.Value=60000 thisform.txtb_reg.Value=10000
thisform.txttgl.Value=DATE()
ELSE
IF thisform.cbo_tin.Value="CABUT GIGI"
thisform.txtb_tin.Value=50000
ELSE
thisform.txtb_tin.Value=80000
ENDIF
ENDIF
ENDIF
thisform.txttotal.Value=thisform.txtb_reg.Value+thisform.txtb_tin.Value

cmdcari Click
SEEK (ALLTRIM(thisform.txtcari.Value))
IF FOUND()
thisform.tampil
ELSE
MESSAGEBOX("maaf data tidak ketemu",0,"info")
ENDIF

Cmdsave Click
APPEND BLANK
Replace no_rm WITH thisform.txtno_rm.Value
Replace nm_pasien WITH thisform.txtnm_pasien.Value
Replace nm_dokter WITH thisform.cbo_dok.Value
Replace tindakan WITH thisform.cbo_tin.Value
Replace b_registrasi WITH thisform.txtb_reg.Value
Replace b_tindakan WITH thisform.txtb_tin.Value
Replace total WITH thisform.txttotal.Value
Replace ubay WITH thisform.txtubay.Value
Replace ukem WITH thisform.txtukem.Value
Replace tgl WITH thisform.txttgl.Value
Replace alamat WITH thisform.txtalamat.Value
IF thisform.optiongroup1.option1.Value=1
Replace poli WITH "Umum"
ELSE
Replace poli WITH "Gigi"
ENDIF

MESSAGEBOX("data tersimpan",0,"warning")

Cmdclose Click
pesan=MESSAGEBOX("yakin mau keluar?",32+4,"Keluar")
IF pesan=6
thisform.Release
ENDIF
txtubay keyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nkeycode=13 then
thisform.txtukem.value=thisform.txtubay.Value-thisform.txttotal.Value
ENDIF

DOKTER (cbo_dok)
Cmddelete Click
TINDAKAN(cbo_tin)
e= MESSAGEBOX("yakin mau dihapus?",48+1,"Info")
IF e=1
DELETE
dr.Santi Sabila
PACK
MESSAGEBOX("Data Telah
KB
Terhapus") thisform.bersih
dr.Eko Bambang
thisform.Refresh
ENDIF
CHECK UP
dr.Heri
Cmdbrowse
Batara CABUT GIGI
Click BROWSE NOEDIT
dr.Melisa Utami TAMBAL GIGI

You might also like