【文章內(nèi)容簡(jiǎn)介】
h allt() repl gg with allt() repl dw with allt() repl dj with val() repl sysl with repl lb with repl sxrq with repl ph with repl chd with sele yuanb2 if allt()allt(subs(lsldj,at(,lsldj,4)+1,at(,lsldj,5)at(,lsldj,4)1)) count to aa for int(bh)=lbh appe blan repl yjj with val(),dj with val(),chd with allt(),ph with 。 sxrq with ,sl with ,fxg with ,bh with val(str(lbh+(aa+1)/100,12,2))。 ysl with ysl+ sele qclr go bott repl bh with val(str(lbh+(aa+1)/100,12,2)) else * if =ctod(subs(lsldj,at(,lsldj,3)+1,at(,lsldj,4)at(,lsldj,3)1)) if =.t. mm=messagebox(原來(lái)的價(jià)格為+allt(subs(lsldj,1,at(,lsldj,1)1))+chr(13)+。 是否更改為+(allt()),1+32,提示) if mm=1 sele yuanb2 loca for bh=lbh+ repl sl with sl+,ysl with ysl+ repl yjj with val(),dj with val() sele qclr go bott repl bh with lbh+ else sele yuanb2 loca for bh=lbh+ repl sl with sl+,ysl with ysl+ sele qclr go bott repl bh with lbh+ endi else sele yuanb2 loca for bh=lbh+ repl sl with sl+,ysl with ysl+ sele qclr go bott repl bh with lbh+ endi * else* sele yuanb2* count to aa for int(bh)=lbh* appe blan* repl yjj with val(),dj with val(),chd with allt(),ph with 。** sxrq with ,sl with ,fxg with ,bh with val(str(lbh+(aa+1)/100,12,2)) * sele qclr * go bott * repl bh with val(str(lbh+(aa+1)/100,12,2)) * endi endi =+val()* = = = = = = = =xxxx = ={^2008/12/31} =.f. endisele yuanb2set filt tosele qclr set filt tosele yuanb set filt to set exac off購(gòu)入藥品界面設(shè)計(jì):藥品購(gòu)入錄入是主要的操作界面,通過(guò)輸入藥品的代碼,可以迅速定位到要輸入的藥品名稱上,在輸入的過(guò)程中有一定的輸入限制,如進(jìn)價(jià)不能比批發(fā)價(jià)格高,失效日期要在現(xiàn)在日期以后,而且在輸入完畢以后,如果不打印,數(shù)據(jù)將不存儲(chǔ)到主數(shù)據(jù)庫(kù)中,以保證數(shù)據(jù)的完整性。在輸入過(guò)程中代碼的輸入與藥品名稱的查找是即時(shí)性的。代碼即時(shí)性的產(chǎn)生代碼如下:define DELKEY 127define ENTER 13define DOWNARROW 3LPARAMETERS nKeyCode, nShiftAltCtrlLOCAL cDisplayValueIF nKeyCode = DELKEY cDisplayValue = ALLTRIM() IF LEN(cDisplayValue)=1 cDisplayValue = =.f. ELSE cDisplayValue = LEFT(cDisplayValue,LEN(cDisplayValue)1) =.t. =.t. =SELECT , FROM yuanb where cdisplayvalue $ into cursor xxx =1 =.f. ENDIFELSE IF nKeyCode=ENTER =.f. else if nKeyCode=DOWNARROW =1 else =.t. cDisplayValue = ALLTRIM()+CHR(nKeyCode) =.t. =.t. =SELECT , FROM yuanb where cdisplayvalue $ into cursor xxx =1 =.f. endi endi ENDIF 衛(wèi)生室購(gòu)藥查詢:可以通過(guò)查詢得到各衛(wèi)生室及門(mén)診部的用藥情況,可以利用日期來(lái)查詢起止日期內(nèi)某個(gè)單位的用藥情況。部分實(shí)現(xiàn)代碼如下:=select distinct gydw from ck1 noconsle into cursor xxx=date()30=date()sele ck1set filt to gydw=allt() and rq= and rq=go top 藥品銷(xiāo)售累計(jì)查詢:可以累計(jì)查詢某個(gè)單位或科室在某一時(shí)期內(nèi)購(gòu)入藥品的合計(jì),對(duì)于衛(wèi)生室管理具有相當(dāng)大的作用。具體查詢代碼的實(shí)現(xiàn)如下:sele ltongjdele allsele distinct gydw from ck1 into cursor xxxsele ltongjappe from dbf(xxx)scan sele ck1 sum dj*gysl to aa for lb中草藥 and gydw= and rq= and rq= sum dj*gysl to bb for lb=中草藥 and gydw= and rq= and rq= sele ltongj repl xy with aa,zhcy with bb,hj with aa+bb,rq with allt(dtoc())+allt(dtoc())endscansele ltongjsum xy to aa=str(aa,14,2)sum zhcy to aa=str(aa,14,2)sum hj to aa=str(aa,14,2)=2=ltongj某品種藥品的模糊查詢:在忘記某種藥品的代碼時(shí),可以用這個(gè)查詢來(lái)查找某種藥品的代碼和名稱,可以按代碼查詢,也可以按名稱查詢,非常簡(jiǎn)便易用。部分查詢代碼如下:if =1 for i=1 to (1) endfendi if =1 =select dm,ypmc,gg,dw from yuanb where llmc $ dm into cursor xxxelse =select dm,ypmc,gg,dw from yuanb where llmc $ ypmc into cursor xxxendi 藥名購(gòu)藥計(jì)劃界面:這個(gè)界面的使用使購(gòu)藥更加方便,而且可以保存為EXCEL文件加以修改和保存。以下為保存為EXCEL文件的部分代碼:gcdelimfile = putfile(39。delimited file:39。, (dtoc(date()))+購(gòu)藥計(jì)劃, 39。XLS39。)if empty(gcdelimfile) amp。amp。按了 esc 鍵cancelendifcopy to amp。gcdelimfile..xls for !dele() type xl5sele jyjhdele all:有關(guān)輸出信息使用方面的內(nèi)容包括使用科室,目的,復(fù)寫(xiě)份數(shù),保管方法,有效期等;使用專用紙;采用針式打印機(jī),輸出的信息內(nèi)容包括輸出項(xiàng)目,位數(shù),數(shù)據(jù)形式。報(bào)表輸出實(shí)現(xiàn)功能模塊:在生成數(shù)據(jù)以后直接打印數(shù)據(jù),其中預(yù)覽略圖如下:購(gòu)入藥品總匯報(bào)表:購(gòu)入藥品的報(bào)表一般為三份。出庫(kù)藥品報(bào)表:本報(bào)表一式三聯(lián)。銷(xiāo)藥累計(jì)統(tǒng)計(jì)報(bào)表:數(shù)據(jù)備份:在系統(tǒng)退出時(shí)自動(dòng)備份,這樣做可以減輕操作,保證數(shù)據(jù)的完整性。**local bf1