【文章內(nèi)容簡(jiǎn)介】
輸出 數(shù)據(jù)備份 退出本系統(tǒng) 備份數(shù)據(jù) 恢復(fù)數(shù)據(jù) 預(yù)覽數(shù)據(jù) 打印數(shù)據(jù) 全部查詢 系統(tǒng)功能結(jié)構(gòu)圖 12 第三部分:系統(tǒng)的實(shí)施 系統(tǒng)設(shè)計(jì)要具備以下要求: 系統(tǒng)性 靈活性 可靠性 經(jīng)濟(jì)性。 物理配置方案設(shè)計(jì): 根據(jù)多方面的因素進(jìn)行配置,系統(tǒng)的吞量,響應(yīng)時(shí)間,可靠性,單機(jī)系統(tǒng),集中式,采用數(shù)據(jù)庫(kù)管理方式。 信息流程圖的設(shè)計(jì): : 一個(gè)界面的友好,應(yīng)以使用者操作方面為前提,還有操作員長(zhǎng)期與這些界面打交道,設(shè)計(jì)一個(gè)好的界面是我們程序開(kāi)發(fā)人員的最高追求,在我看來(lái),編一個(gè)程序真的很簡(jiǎn)單,一個(gè)功能就有很多種 實(shí)現(xiàn)的方法,我在設(shè)計(jì)使用中發(fā)現(xiàn),用這輸入 存儲(chǔ) 1 處理 中間數(shù) 存儲(chǔ) 2 處理 2 處理 3 輸出 1 輸出 2 13 個(gè)版本開(kāi)發(fā)一個(gè)系統(tǒng),遠(yuǎn)不如我用 Powerbuilder 簡(jiǎn)單,在那個(gè)開(kāi)發(fā)環(huán)境,不像這個(gè)版本,很多東西編起來(lái)很礙手礙腳的,放不開(kāi)。主界面,我起先考慮的也跟大多同學(xué)一樣,用菜單生成器,最后發(fā)現(xiàn),一個(gè)小小的系統(tǒng),功能模塊又非常之小,我就放棄了菜單方式,選用了現(xiàn)在這個(gè)樣子。 登陸 設(shè)計(jì): : 簡(jiǎn)單的登錄界面使用戶有一種親切的操作心情。 選擇您的姓名之后,輸入口令,如果輸入的口令是錯(cuò)誤的會(huì)給出提示,如果三次輸入錯(cuò)誤,將退出系統(tǒng)。 14 人員管理界面設(shè)計(jì): 設(shè)置多用戶操作,可以通過(guò)按鈕增加,修改,刪除等操作,對(duì)人員進(jìn)行管理。 15 藥品分類界面設(shè)計(jì): 藥品期初設(shè)置的一個(gè)方面,為保證藥品分類計(jì)算時(shí) ,保證數(shù)據(jù)的有效性和立人準(zhǔn)確性。 增加代碼如下: if =增加 =39。確定 39。 =+200 =.t. =.t. else =增加 if !empty() sele lb appe blan repl lb with allt() endi 16 = =.t. =.f. endi =39。39。 數(shù)據(jù)存儲(chǔ)設(shè)計(jì):主要采用數(shù)據(jù)庫(kù)文件存儲(chǔ)形式,制定文件的分類,設(shè)定主文件,處理文件,工作文件,后備文件,周轉(zhuǎn) 文件等。 數(shù)據(jù)存儲(chǔ)界面設(shè)計(jì): 首先要把新藥的品種輸入的計(jì)算機(jī)之中,在增加新藥的時(shí)候,如果輸入的代碼是重復(fù)的,計(jì)算機(jī)將提示輸入重復(fù)錯(cuò)誤。 提示代碼重復(fù)錄入的 實(shí)現(xiàn)代碼如下: if !empty() sele yuanb loca for allt(dm)=allt() if found() 17 mm=messagebox(您輸入的代碼已經(jīng)使用,請(qǐng)重新輸入 ,1+32,提示 ) if mm=1 = retu .f. else retu .t. endi endi endi 增加完新藥以后,需要對(duì)當(dāng)前實(shí)有的藥品進(jìn)行錄入,可以同藥品購(gòu)入的錄入用 同一個(gè)錄入界面,但在以后的使用過(guò)程中,賬簿的正確性就不能保證 ,所以最好使用期初錄入界面進(jìn)行錄入,保證數(shù)據(jù)的完整性。 期初錄入界面設(shè)計(jì): 確定 .click local aa 18 aa=0 set exac on if empty() retu .t. else sele yuanb loca for dm=allt() lbh=bh repl sl with sl+ sele qclr appe blan repl rq with ctod(allt(())+/+allt(())+/+allt(())) repl dm with allt() repl ypmc with 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 19 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 20 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)) 21 * endi endi =+val()* = = = = = = = =xxxx = ={^2021/12/31} =.f. endi sele yuanb2 set filt to sele qclr set filt to sele yuanb set filt to set exac off 購(gòu)入藥品界面設(shè)計(jì): 22 藥品購(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 127 define ENTER 13 define DOWNARROW 3 LPARAMETERS nKeyCode, nShiftAltCtrl LOCAL cDisplayValue IF nKeyCode = DELKEY cDisplayValue = ALLTRIM() IF LEN(cDisplayValue)=1 cDisplayValue = 23 =.f. ELSE cDisplayValue = LEFT(cDisplayValue,LEN(cDisplayValue)1) =.t. =.t. =SELECT , FROM yuanb where cdisplayvalue $ into cursor xxx =1 =.f. ENDIF ELSE 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 24 =.f. endi endi ENDIF 衛(wèi)生室購(gòu)藥查詢 : 可以通過(guò)查詢得到各衛(wèi)生室及門診部的用藥情況,可以利用日期來(lái)查詢起止日期內(nèi) 某個(gè)單位的用藥情況。 部分實(shí)現(xiàn)代碼如下: 查詢 .click =select distinct gydw from ck1 noconsle into cursor xxx =date()30 25 =date() sele ck1 set filt to gydw=allt() and rq= and rq= go top 藥品銷售累計(jì)查詢: 可以累計(jì)查詢某個(gè)單位或科室在某一時(shí)期內(nèi)購(gòu)入藥品的合計(jì),對(duì)于衛(wèi)生室管理具有相當(dāng)大的作用。 具體查詢代碼的實(shí)現(xiàn)如下: 查詢 .click sele ltongj dele all sele distinct gydw from ck1 into cursor xxx sele ltongj appe from dbf(xxx) scan s