ss
| RSS | RSS Forum | AboutUS |
Disarankan menggunakan browser selain Internet Explorer, resolusi minimal 1024x768
...
UserName:
PassWord:
     Lost?
Daftar jadi Anggota !
 


stress? deadline kelewat?
bos ngamuk? pc meledak?
masuk sini !


OpenID

(?)

e.g. myname.myhost.com


Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
LAST FORUM POSTS
goto PostKeyexist...(1)
 by ImanD
 on 20. Nov at 16:46
goto PostPindah Data Checklistbox ke Edit////(1)
 by deLogic
 on 20. Nov at 16:13
goto PostLowongan PT AT Indonesia (Astra Otopart Group)(3)
 by madi
 on 20. Nov at 13:19
goto PostNew page (dalam penggabungan report)??(1)
 by madi
 on 20. Nov at 13:08
goto PostLowongan Programmer - Jogja(8)
 by wahyu_elrahma
 on 20. Nov at 11:15
goto Postvariabel yang dapat diakses keseluruhan program(3)
 by deLogic
 on 20. Nov at 10:04
goto PostIlmuKomputer.Com - mohon doa buat kesembuhan IKC yaa(8)
 by jimbot
 on 20. Nov at 00:31

[Access Forum]


Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
rizuOffline
Post subject: cara bikin no id pasien buat program dokter  PostPosted: 05-09-2008 21:24
onNovice


Joined: 05-09-2008 21:18
Posts: 13

Status: Offline
kakak..maap..mgkn pertanyaannya terlalu mudah..tapi saya bnr2 bingung..
ada yg bisa bantu ajarin caranya buat no id pasien..
ketentuannya begini..
no id ada 1huruf awal dari nama depan pasien +no urut dari banyaknya pasien dgn huruf awal dari nama pasien..

contoh..
nama:Budi
no idnya adalah B01(karena budi adalah pasien pertama yg menggunakan huruf B)

mohon bantuannya kakak..
makasih.. Smile Smile Smile
 
 View user's profile Send private message  
Reply with quote Back to top
n3o_cybertech
Post subject: RE: cara bikin no id pasien buat program dokter  PostPosted: 06-09-2008 08:21
onProfessional


Joined: 10-02-2007 12:30
Posts: 558

pas onExit edNama(Input nama pasien) misalnya, kita crop 1 karakter utama, misalkan :

  1. var
  2. strPertama,strMax: String;
  3. begin
  4. strPertama := edNama.Text[1];
  5. with Query1 do
  6. begin
  7. Close;
  8. SQL.Text := 'SELECT mid(idpasien,2,length(idpasien)) FROM pasien ORDER BY idpasien DESC';
  9. Open;
  10. end;
  11. if Query1.Eof then
  12. begin
  13. edKode.Text := strPertama + '1';
  14. exit;
  15. end;
  16. strMax := Query1.FieldByName('idpasien').AsString;
  17. edKode.Text := strPertama + IntToStr(StrToInt(strMax) + 1);
  18. end;

ya gitu klo gak salah...lom tak coba di delphinya...kode di atas asumsinya anda memakai MySQL sebagai databasenya...

_________________

===============================
KEEP SPIRIT OF PROGRAMMING...!!!!
===============================

contact me [at]
-> Phone :
+62817 040 8878
-> E-mail :
einsthonk@gmail.com
-> URL :
http://www.einsthonk.wordpress.com
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
wahyu_elrahmaOffline
Post subject: RE: cara bikin no id pasien buat program dokter  PostPosted: 06-09-2008 09:23
onConfident


Joined: 26-02-2008 15:49
Posts: 22

Status: Offline
mungkin bisa menambahkan dari mas tigor, untuk sintak sqlnya gini aja :

$_sql :="SELECT LEFT(nama, 1) FROM pasien ORDER BY nama ASC ";

jadi, ngambil nama dari tabel pasien 1 karakter. trus divariabelkan untuk dibuat autocode
 
 View user's profile Send private message  
Reply with quote Back to top
rizuOffline
Post subject: RE: cara bikin no id pasien buat program dokter  PostPosted: 06-09-2008 10:30
onNovice


Joined: 05-09-2008 21:18
Posts: 13

Status: Offline
ow..saya coba dl..makasih bny kk..Smile
 
 View user's profile Send private message  
Reply with quote Back to top
n3o_cybertech
Post subject: RE: cara bikin no id pasien buat program dokter  PostPosted: 06-09-2008 14:41
onProfessional


Joined: 10-02-2007 12:30
Posts: 558

Quote:

mungkin bisa menambahkan dari mas tigor

wah nyebut merk neh... Mr. Green

_________________

===============================
KEEP SPIRIT OF PROGRAMMING...!!!!
===============================

contact me [at]
-> Phone :
+62817 040 8878
-> E-mail :
einsthonk@gmail.com
-> URL :
http://www.einsthonk.wordpress.com
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
rizuOffline
Post subject: RE: cara bikin no id pasien buat program dokter  PostPosted: 07-09-2008 21:10
onNovice


Joined: 05-09-2008 21:18
Posts: 13

Status: Offline
kk2 masih ga bisa..T_T
 
 View user's profile Send private message  
Reply with quote Back to top
heerrrOffline
Post subject:   PostPosted: 07-09-2008 23:49
onNovice


Joined: 03-09-2008 01:18
Posts: 10

Status: Offline
nih yang sekali query Very Happy

Code:
select concat(UPPER(left('NAMAPASIENBARU',1)),right(concat('000000000',count(*)+1),5)) as NextPasienID from tpasien where UPPER(left(fnama,1))=UPPER(left('NAMAPASIENBARU',1));

_________________
Long road to go...
 
 View user's profile Send private message  
Reply with quote Back to top
rizuOffline
Post subject:   PostPosted: 09-09-2008 20:56
onNovice


Joined: 05-09-2008 21:18
Posts: 13

Status: Offline
makasih kk2
 
 View user's profile Send private message  
Reply with quote Back to top
nickOffline
Post subject:   PostPosted: 18-11-2008 00:06
onBeginner


Joined: 18-11-2008 00:01
Posts: 4

Status: Offline
Om n3o_cybertech, Kalo memakai Paradox bisa ga?
Koq Error : "length(idpasien)". Question
 
 View user's profile Send private message  
Reply with quote Back to top
johnizzyOffline
Post subject:   PostPosted: 18-11-2008 00:16
onIntermediate


Joined: 31-08-2008 01:39
Posts: 59

Status: Offline
waduh ane ga pake paradox....
 
 View user's profile Send private message  
Reply with quote Back to top
nickOffline
Post subject:   PostPosted: 18-11-2008 00:26
onBeginner


Joined: 18-11-2008 00:01
Posts: 4

Status: Offline
Waduuhhhh....
Ada solusi buat paradox ga ya?
 
 View user's profile Send private message  
Reply with quote Back to top
nickOffline
Post subject:   PostPosted: 18-11-2008 18:15
onBeginner


Joined: 18-11-2008 00:01
Posts: 4

Status: Offline
Hmmm......
 
 View user's profile Send private message  
Reply with quote Back to top
nickOffline
Post subject:   PostPosted: 18-11-2008 18:15
onBeginner


Joined: 18-11-2008 00:01
Posts: 4

Status: Offline
Hmmm......
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 5 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits