| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403 |
- <template>
- <!-- 智能开方 -->
- <div class="prescribing flex-plane-center-top">
- <div class="pre-left" v-if="!isShrink">
- <!-- 标题信息 -->
- <div class="pre-title">
- <div class="flex-vertical-center-l title-container">
- <span></span>
- <div>患者信息</div>
- </div>
- </div>
- <div class="patiens-msg" v-if="Object.keys(patiensMsg).length>0">
- <p v-if="patiensMsg.sex">患者性别:{{patiensMsg.sex}}</p>
- <p v-if="patiensMsg.age">患者年龄:{{patiensMsg.age}}</p>
- <p
- v-if="patiensMsg.isGravidity && patiensMsg.isGravidity=='2'"
- >是否怀孕:{{patiensMsg.isGravidity=='1'?'否':patiensMsg.isGravidity=='2'?'是':'无'}}</p>
- <p
- v-if="patiensMsg.isBreastFeeding && patiensMsg.isBreastFeeding==1"
- >是否哺乳:{{patiensMsg.isBreastFeeding==1?'是':patiensMsg.isBreastFeeding==2?'否':'无'}}</p>
- </div>
- <div class="pre-title mr-t10">
- <div class="flex-vertical-center-l title-container">
- <span></span>
- <div>中医电子病历</div>
- </div>
- </div>
- <div class="patiens-msg" v-if="patiensMsg.outpatientElectronicmedicalrecord">
- <p v-if="patiensMsg.outpatientElectronicmedicalrecord.chiefcomplaint">
- <span>主诉:</span>
- {{patiensMsg.outpatientElectronicmedicalrecord.chiefcomplaint}}
- </p>
- <p v-if="patiensMsg.outpatientElectronicmedicalrecord.historypresent">
- <span>现病史:</span>
- {{patiensMsg.outpatientElectronicmedicalrecord.historypresent}}
- </p>
- <p v-if="patiensMsg.outpatientElectronicmedicalrecord.pasthistory">
- <span>既往史:</span>
- {{patiensMsg.outpatientElectronicmedicalrecord.pasthistory}}
- </p>
- <p v-if="patiensMsg.outpatientElectronicmedicalrecord.fourmedicine">
- <span>中医四诊:</span>
- {{patiensMsg.outpatientElectronicmedicalrecord.fourmedicine}}
- </p>
- <p v-if="patiensMsg.outpatientElectronicmedicalrecord.physicalexamination">
- <span>体格检查:</span>
- {{patiensMsg.outpatientElectronicmedicalrecord.physicalexamination}}
- </p>
- <p v-if="patiensMsg.outpatientElectronicmedicalrecord.supplementaryexamination">
- <span>辅助检查:</span>
- {{patiensMsg.outpatientElectronicmedicalrecord.supplementaryexamination}}
- </p>
- <div v-if="patiensMsg.outpatientElectronicmedicalrecord.image1.length>0">
- <div style="margin: 4px 0 8px;">报告上传:</div>
- <el-image
- :preview-src-list="patiensMsg.outpatientElectronicmedicalrecord.image1"
- :src="item"
- :key="index"
- style="width:64px;height: 64px;margin-right: 10px;"
- alt
- v-for="(item,index) in patiensMsg.outpatientElectronicmedicalrecord.image1"
- />
- </div>
- </div>
- <!-- mr-t30 -->
- <div class="pre-title" v-if="false">
- <div class="flex-vertical-center-l title-container">
- <span></span>
- <div>中医诊断</div>
- <!-- inferRecipe(2) -->
- <el-button size="mini" type="warning" @click="tcmClick()" style="margin-left:10px;">推导</el-button>
- </div>
- </div>
- <!-- <TCMDiagnosis v-if="Object.keys(patiensMsg).length>0" :patiensMsg="patiensMsg" ref="TCM"></TCMDiagnosis> -->
- <div class="pre-title mr-t10">
- <div class="flex-vertical-center-l title-container">
- <span></span>
- <div>快捷查询</div>
- </div>
- </div>
- <!-- 协定方 -->
- <div class="mr-t10 agreement">
- <div class="agree-tab flex-vertical-between">
- <div
- :class="agree_current==0?'flex-center agree-active':'flex-center'"
- @click.stop="changeAgree(0)"
- >协定方</div>
- <div
- :class="agree_current==1?'flex-center agree-active':'flex-center'"
- @click.stop="changeAgree(1)"
- >方剂</div>
- <div
- :class="agree_current==2?'flex-center agree-active':'flex-center'"
- @click.stop="changeAgree(2)"
- >参考医案</div>
- </div>
- <!-- 展开效果 -->
- <div class="collapse" v-if="agree_current==0">
- <el-collapse v-model="activeNames" accordion @change="activeChange">
- <el-collapse-item
- :title="item.name"
- :name="item.index"
- v-for="(item,index) in collapseData"
- :key="item.name+index"
- >
- <div class="collapse-body">
- <div
- class="collapse-item flex-vertical-between"
- v-for="(item1,index1) in item.list"
- :key="item1.name+index1"
- >
- <div class="med-name" @click="getAccordDetail(item1.preId)">{{item1.name}}</div>
- <!-- <div class="med-btns flex-vertical-center-r">
- <div class="flex-center" @click="showAgree=true">换方</div>
- <div class="bg-yellow flex-center">合方</div>
- </div>-->
- </div>
- <div class="collapse-more flex-center" @click="loadMoreCollapse(item)">
- <img src="../../assets/point3.png" alt />
- </div>
- </div>
- </el-collapse-item>
- </el-collapse>
- </div>
- <!-- 第二个 和第三个 tab 选中效果 -->
- <div class="basis" v-if="agree_current!=0">
- <div class="basis-top-search flex-center">
- <div v-if="agree_current==1">
- <el-input placeholder="请输入内容" v-model="agree_key" size="mini">
- <i slot="prefix" class="el-input__icon el-icon-search"></i>
- </el-input>
- </div>
- <div v-if="agree_current==2">
- <el-input placeholder="请输入内容" v-model="agree_key1" size="mini">
- <i slot="prefix" class="el-input__icon el-icon-search"></i>
- </el-input>
- </div>
- <div class="flex-center search-btn" @click="searchPre">搜索</div>
- </div>
- <!-- 方剂 -->
- <div v-if="agree_current==1">
- <div
- class="collapse-item flex-vertical-between"
- v-for="(item,index) in rPrescription.list"
- :key="'d'+index"
- >
- <div
- class="med-name"
- @click="getPreDetal(item.pried ||item.acupreid,1)"
- >{{item.prename || item.acupreid}}</div>
- <div class="med-btns flex-vertical-center-r" v-if="agree_current!=2">
- <div class="flex-center" @click.self.stop="inferChange(item)">换方</div>
- <div class="bg-yellow flex-center" @click.self.stop="inferChange1(item)">合方</div>
- </div>
- </div>
- </div>
- <!-- 参考议案 -->
- <div v-if="agree_current==2">
- <div
- class="collapse-item flex-vertical-between"
- v-for="(item,index) in rDoctorCase.list"
- :key="item.disname+index"
- >
- <div
- class="med-name"
- @click="getDCaseDetail(item.verifyid)"
- >{{item.disname}} {{item.attendingexpert}}</div>
- </div>
- </div>
- <div class="collapse-more flex-center" @click="loadMorePre">
- <img src="../../assets/point3.png" alt />
- </div>
- </div>
- </div>
- <div class="pre-title mr-t10" v-if="false">
- <div class="flex-vertical-center-l title-container">
- <span></span>
- <div>就诊记录</div>
- </div>
- </div>
- <div class="pre-steps" v-if="false">
- <div class="steps">
- <el-steps direction="vertical" :active="patiensMsg.recordLength" space="55px">
- <el-step v-for="(item,index) in patiensMsg.patientRecord" :key="item.timeStr+index">
- <template slot="icon">
- <img src="../../assets/step.png" alt class="icon" />
- </template>
- <template slot="title">
- <div @click="getSeeDByID(item.id)" class="step-body">
- <div class="step-name">{{item.timeStr}}</div>
- <div class="step-name">{{item.illnessName}}</div>
- </div>
- </template>
- </el-step>
- </el-steps>
- </div>
- <!-- <div class="find-more flex-center">
- <img src="../../assets/more-down.png" alt="">
- <span>查看更多</span>
- </div>-->
- </div>
- </div>
- <!-- 中间主体部分 -->
- <div class="pre-center">
- <!-- 768 页面 展示病名 -->
- <div class="page-768">
- <!-- 扩展icon -->
- <div class="kz-icon" @click="setShrink">
- <i class="el-icon-d-arrow-right" v-if="!isShrink"></i>
- <i class="el-icon-d-arrow-left" v-if="isShrink"></i>
- </div>
- <!-- 中医诊断 -->
- <TCMDiagnosis
- direction="horizontal"
- :patiensMsg="patiensMsg"
- v-if="Object.keys(patiensMsg).length>0"
- ref="TCM"
- class-name="prescr"
- ></TCMDiagnosis>
- <!-- 推导按钮 -->
- <div class="deduce">
- <el-button size="mini" type="primary" @click="tcmClick()">推导</el-button>
- <el-popover
- placement="top-start"
- title
- width="220"
- trigger="hover"
- style="margin-left:10px;"
- v-if="innerWidth <= 768"
- >
- <el-button size="mini" slot="reference" type="primary">HIS</el-button>
- <div class="his-msg his-msg-mini" v-if="Object.keys(patiensMsg).length>0">
- <div class="his-item">
- <div class="name">HIS病名:</div>
- <div class="value">
- <el-input
- size="mini"
- disabled
- :value="patiensMsg.maindiagnosis.namemedicinehis || ''"
- ></el-input>
- </div>
- </div>
- <div class="his-item">
- <div class="name">HIS证型:</div>
- <div class="value">
- <el-input
- size="mini"
- disabled
- :value="patiensMsg.maindiagnosis.syndrometypeshis || ''"
- ></el-input>
- </div>
- </div>
- </div>
- </el-popover>
- </div>
- <!-- his信息 -->
- <div class="his-msg" v-if="innerWidth>768 ">
- <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
- <div class="name">HIS病名:</div>
- <div class="value">
- <el-input size="mini" disabled :value="patiensMsg.maindiagnosis.namemedicinehis ||''"></el-input>
- </div>
- </div>
- <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
- <div class="name">HIS证型:</div>
- <div class="value">
- <el-input
- size="mini"
- disabled
- :value="patiensMsg.maindiagnosis.syndrometypeshis || ''"
- ></el-input>
- </div>
- </div>
- </div>
- </div>
- <div class="flex-vertical-between center-header">
- <div class="center-tab flex-vertical-center-l">
- <template v-for="(item,index) in contentTabs">
- <div
- :class="container_i==index?'flex-center active':'flex-center'"
- @click.self="changeContainer(index)"
- v-if="!item.hide"
- :key="item.name+index"
- >
- <span @click="changeContainer(index)" :style="{color:item.color}">{{item.name}}</span>
- </div>
- </template>
- </div>
- <div class="header-total flex-vertical-center-r flex-wrap" v-if="false">
- <div v-if="contentTabs[0].check">
- 中药处方总费用:
- <span>{{chineseM.allMoney}}元</span>
- </div>
- <div v-if="contentTabs[1].check">
- 中药制剂总费用:
- <span>{{medicineC.allMoney}}元</span>
- </div>
- <div v-if="contentTabs[2].check">
- 适宜技术处方总费用:
- <span>{{suitScience.allMoney}}元</span>
- </div>
- <div>
- 合计费用:
- <span>{{totalPrice}}元</span>
- </div>
- </div>
- <!-- 右侧按钮 -->
- <div class="flex-vertical-center-r flex-wrap">
- <el-button size="mini" @click="openUnifyPrescPrec" type="primary">统建处方</el-button>
- <el-button size="mini" :loading="tongueAndFaceLoading" :disabled="!tongueAndFaceAnalysis" @click="openTongueAndFaceAnalysis" type="primary">萧山区中医健康微管家</el-button>
- <el-button
- size="mini"
- type="primary"
- @click="handleReplenish"
- >{{ innerWidth > 768 ? '补充中医电子病历' :'补充病历' }}</el-button>
- <el-button size="mini" @click="openDCase" v-if="isShrink">参考医案</el-button>
- <el-button size="mini" @click="openPrec" type="primary">协定方/方剂</el-button>
- <el-popover
- placement="left"
- title
- width="150"
- trigger="hover"
- v-if="rRecomendR.length>0 && isShrink"
- style="margin-left:10px;"
- >
- <!-- hover -->
- <el-button size="mini" type="primary" slot="reference">推荐的方剂</el-button>
- <template>
- <div class="recommend flex-center" style="width:100%">
- <div class="banner">
- <div class="r-banner-body">
- <div
- class="r-body-item flex-vertical-between"
- v-for="(item1,index1) in rRecomendR"
- :key="'c'+index1"
- >
- <div
- :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid ?'active':'',]"
- v-if="item1.showType==0"
- @click.stop="getPreDetal(item1.preid || item1,1)"
- >
- <span v-if="item1.prename">{{item1.prename}}</span>
- <span
- v-else
- >{{item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}}</span>
- <!-- {{item1.prename?item1.prename+'('+item1.book?item1.book:'暂无'+')': item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}} -->
- </div>
- <!-- 经验方 -->
- <div
- :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid ?'active':'',]"
- v-else
- @click="getExperinceDetail(item1.pid)"
- >
- <!-- <img src='~@/assets/expr.png' v-if="item1.showType==1" class="icon-expr" /> -->
- <span>{{item1.name}}({{item1.experttitle}})</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- </el-popover>
- <el-button size="mini" type="primary" v-if="isShrink&&rRecomendR.length==0">推荐的方剂</el-button>
- </div>
- </div>
- <!-- 代煎/配送 -->
- <!-- <div class="address">
- <medAdress
- ref="medAdress"
- :container_i="container_i"
- @psChange="psChange"
- @djChange="djChange"
- :isShowDj="isShowDj"
- :isShowPs="isShowPs"
- ></medAdress>
- </div>-->
- <!-- 表格数据展示 -->
- <div class="center-table">
- <chinese-medicine
- @find="findDrug($event)"
- v-show="container_i===0"
- id="chineseM"
- ref="chineseM"
- :totalAllMoney.sync="chineseM.allMoney"
- @submit="submitRecipe1()"
- :showSubmit="showSubmit"
- :isShrink="isShrink"
- :isDaiJian="Number(isDaiJian)"
- :isPs="isPs"
- @updateDp="onUpdateDp"
- ></chinese-medicine>
- <medicineChinese
- @find="findDrug($event)"
- v-show="container_i==1"
- ref="medicineC"
- id="medicineC"
- @submit="submitRecipe1()"
- :totalAllMoney.sync="medicineC.allMoney"
- :showSubmit="showSubmit"
- :isPs="isPs"
- ></medicineChinese>
- <suitScience
- @find="find($event)"
- v-show="container_i==2"
- ref="suitScience"
- id="suitScience"
- @submit="submitRecipe1()"
- :totalAllMoney.sync="suitScience.allMoney"
- :showSubmit="showSubmit"
- ></suitScience>
- </div>
- </div>
- <div class="pre-right" v-show="container_i!=1 && !isShrink">
- <!-- 标题信息 -->
- <div class="pre-title flex-vertical-between">
- <div class="flex-vertical-center-l title-container">
- <span></span>
- <div>推荐的方剂</div>
- </div>
- <!-- <div class="tuidao flex-center" @click="inferRecipe(2)" v-if="rRecomendR.length>0">推导</div> -->
- </div>
- <!-- 推荐方剂 -->
- <div class="recommend flex-center" v-if="rRecomendR.length>0">
- <!-- <div class="arrow-left flex-center" @click="changeRbanner('reduce')">
- <img src="../../assets/arrow-left.png" alt="">
- </div>-->
- <div class="banner">
- <!-- <el-carousel ref="r_banner" height="80px" :initial-index='r_current' arrow='never' indicator-position='none'
- :autoplay='false'>-->
- <!-- <el-carousel-item v-for="(item,index) in rRecomendR" :key="'b'+index"> -->
- <div class="r-banner-body">
- <div
- class="r-body-item flex-vertical-between"
- v-for="(item1,index1) in rRecomendR"
- :key="'c'+index1"
- >
- <div
- :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid ?'active':'',]"
- v-if="item1.showType==0"
- @click.stop="getPreDetal(item1.preid || item1,1)"
- >
- <span v-if="item1.prename">{{item1.prename}}</span>
- <span
- v-else
- >{{item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}}</span>
- <!-- {{item1.prename?item1.prename+'('+item1.book?item1.book:'暂无'+')': item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}} -->
- </div>
- <!-- 经验方 -->
- <div
- :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid ?'active':'',]"
- v-else
- @click="getExperinceDetail(item1.pid)"
- >
- <!-- <img src='~@/assets/expr.png' v-if="item1.showType==1" class="icon-expr" /> -->
- <span>{{item1.name}}({{item1.experttitle}})</span>
- </div>
- <!-- <div class="med-btns flex-vertical-center-r"> -->
- <!-- 专家经验换方 -->
- <!-- <div class="flex-center" v-if="item1.showType==1" @click.self.stop="turnRecipe3(item1)">换方</div>
- <div class="flex-center bg-yellow" v-if="item1.showType==1" @click.self.stop="joinRecipe3(item1)">合方
- </div>
- <div class="flex-center" v-if="item1.showType==0"
- @click.self.stop="inferChange(item1,item1.prename?'':1,item1.prename?'':1)">换方</div>
- <div class="bg-yellow flex-center" v-if="item1.showType==0"
- @click.self.stop="inferChange1(item1,item1.prename?'':1,item1.prename?'':1)">合方
- </div>-->
- <!-- </div> -->
- </div>
- </div>
- <!-- </el-carousel-item> -->
- <!-- </el-carousel> -->
- </div>
- <!-- <div class="arrow-left flex-center" @click="changeRbanner('add')">
- <img src="../../assets/arrow-right.png" alt="">
- </div>-->
- </div>
- <!-- 安全合理用药检测 -->
- <div class="pre-title mr-t10" v-if="container_i!=2">
- <div class="flex-vertical-center-l title-container">
- <span></span>
- <div>安全合理用药检测</div>
- </div>
- <div class="patiens-msg mr-t10" v-if="rationalMed.length>0">
- <div class="p" v-if="raDoseShow">
- <!-- {{item.matname}}({{item.matbzjj}}) -->
- <!-- <div class="patiens-name">{{item.matname}}</div> -->
- <div class="patiens-cate">超剂量药品:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed10" :key="index">
- <span v-if="item.showDose">
- <span class="matname">{{item.matname}}</span>
- <span style="color:red;">({{item.matmindosage}}-{{item.matmaxdosage}})</span>
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed2.length>0">
- <div class="patiens-cate">慎忌禁用药:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed2" :key="index">
- <span v-if="item.matsjj">
- <span class="matname">{{item.matname}}</span>
- ({{item.matsjj |ftsjj}})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed3.length>0">
- <div class="patiens-cate">孕妇慎忌禁:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed3" :key="index">
- <span v-if="item.matyfsjj">
- <span class="matname">{{item.matname}}</span>
- <span :style="{color:item.matyfsj==3?'red':''}">({{item.matyfsjj |fyfsjj}})</span>
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed4.length>0">
- <div class="patiens-cate">服药饮食禁忌:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed4" :key="index">
- <span v-if="item.matysjj">
- <span class="matname">{{item.matname}}</span>
- ({{item.matysjj?item.matysjj:'无'}})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed5.length>0">
- <div class="patiens-cate">药物毒性说明:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed5" :key="index">
- <span v-if="item.matdxsm">
- <span class="matname" style="color:red;">{{item.matname}}</span>
- ({{item.matdxsm?item.matdxsm:'无'}})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed6.length>0">
- <div class="patiens-cate">病证用药禁忌:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed6" :key="index">
- <span v-if="item.matbzjj">
- <span class="matname">{{item.matname}}</span>
- ({{item.matbzjj?item.matbzjj:'无'}})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed7.length>0">
- <div class="patiens-cate">十八反:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed7" :key="index">
- <!-- <span v-if='item.matsbf'>{{fsbf(item.matsbf,item.matname)}}</span> -->
- <span v-if="item.matsbf">
- <span style="color:red;">{{item.matname}}</span>
- 反{{item.matsbf}}
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed8.length>0">
- <div class="patiens-cate">十九畏:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed8" :key="index">
- <!-- <span v-if="item.matsjw">{{fsjw(item.matsjw,item.matname)}}</span> -->
- <span v-if="item.matsjw">
- <span style="color:red;">{{item.matname}}</span>
- 畏{{item.matsjw}}
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed9.length>0">
- <div class="patiens-cate">用药不宜:</div>
- <div class="patiens-desc" v-for="(item,index) in rationalMed9" :key="index">
- <span v-if="item.matby">{{fmatby(item.matby,item.matname) }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 方剂详情 -->
- <Popup
- :showDialog="showDialog"
- distanceTop="3vh"
- @cancle="changeRecipe"
- title="方剂详情"
- @confim="joinRecipe()"
- confimText="合方"
- cancleText="换方"
- :cancleStyle="{background:'#FFB55F',color:'#fff'}"
- width="700px"
- >
- <div class="drug-body" slot="body">
- <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
- <span>方剂名:</span>
- <div>{{preInfo.prename}}</div>
- </div>
- <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
- <span>功效:</span>
- <div>{{preInfo.efficacy}}</div>
- </div>
- <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
- <span>主治:</span>
- <div>{{preInfo.indication}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>处方明细:</span>
- <div class="flex-vertical-center-l flex-wrap">
- <span
- v-for="(item,index) in preInfo.items"
- :key="'e'+index"
- >{{item.matname || item.acuname}}{{item.dose}}{{item.unit}}</span>
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>方解:</span>
- <div>{{preInfo.annotation ||preInfo.operation}}</div>
- </div>
- <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
- <span>用法:</span>
- <div>{{preInfo.preusage}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>出处:</span>
- <div>{{preInfo.presource || preInfo.book}}</div>
- </div>
- </div>
- </Popup>
- <!-- 药品详情 -->
- <Popup
- width="80%"
- :showDialog="showDrug"
- @cancle="showDrug=false"
- distanceTop="3vh"
- title="药品详情"
- :showBtns="false"
- >
- <div class="drug-body" slot="body">
- <div class="drug-item flex-plane-center-l">
- <span>名称:</span>
- <div>{{drugInfo.matname}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>别名:</span>
- <div>{{drugInfo.matsynonyms}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>剂量区间:</span>
- <div>{{drugInfo.matmindosage}}-{{drugInfo.matmaxdosage}}{{drugInfo.unit}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>单位:</span>
- <div>{{drugInfo.unit}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>用法:</span>
- <div>{{drugInfo.matusage}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>用法禁忌:</span>
- <div>{{drugInfo.matsjj}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>性味:</span>
- <div>{{drugInfo.matflavour}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>归经:</span>
- <div>{{drugInfo.matmeridian}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>功效:</span>
- <div>{{drugInfo.matefficacy}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>应用:</span>
- <div>{{drugInfo.matapplication}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>使用注意:</span>
- <div>
- <div>{{drugInfo.mattaboo}}</div>
- <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>图示:</span>
- <div
- class="flex-plane-center-l"
- v-for="(item,index) in drugInfo.matphoto"
- :key="'f'+index"
- >
- <img :src="item" alt />
- </div>
- </div>
- <div class="flex-vertical-center-l flex-wrap">
- <div class="drug-item1 flex-plane-center-l">
- <span>相似中药鉴别使用:</span>
- <div>
- <div v-for="(item,index) in drugInfo.xiangsi" :key="'g'+index">
- <span
- class="mad-cy"
- v-for="(item1,index1) in item.relmats"
- :key="'h'+index1"
- >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
- <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
- </div>
- </div>
- </div>
- </div>
- <div class="flex-vertical-center-l flex-wrap">
- <div class="drug-item1 flex-plane-center-l">
- <span>常用药对:</span>
- <div>
- <div v-for="(item,index) in drugInfo.changyong" :key="index">
- <span
- class="mad-cy"
- v-for="(item1,index1) in item.relmats"
- :key="'i'+index1"
- >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
- <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </Popup>
- <!-- 药品详情 -->
- <Popup
- width="50%"
- distanceTop="5vh"
- :showDialog="showXuewei"
- @cancle="showXuewei=false"
- title="穴位详情"
- :showBtns="false"
- >
- <div class="drug-body" slot="body">
- <div class="drug-item flex-plane-center-l">
- <span>穴位名称:</span>
- <div>
- <div>{{xwinfo.acuname}}</div>
- <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>定位:</span>
- <div>
- <div>{{xwinfo.acuposotion}}</div>
- <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>解剖:</span>
- <div>
- <div>{{xwinfo.acudiscection}}</div>
- <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>主治:</span>
- <div>
- <div>{{xwinfo.acumaintreat}}</div>
- <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>操作:</span>
- <div>
- <div>{{xwinfo.acuoperation}}</div>
- <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>针刺:</span>
- <div>
- <div>{{xwinfo.acuneedling}}</div>
- <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>图示:</span>
- <!-- <div class="flex-plane-center-l" v-for="(item,index) in drugInfo.acuimg" :key="index">
- <img :src="item" alt="">
- </div>-->
- <div class="img">
- <img :src="xwinfo.acuimg" alt />
- </div>
- </div>
- </div>
- </Popup>
- <!-- 我的协定方 -->
- <Popup
- :showDialog="showAgree"
- @cancle="showAgree=false"
- distanceTop="5vh"
- title="我的协定方"
- :showBtns="false"
- >
- <div class="drug-body" slot="body">
- <div class="drug-item flex-plane-center-l">
- <span>方名:</span>
- <div>{{agreeInfo.name}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>功效适应症:</span>
- <div>{{agreeInfo.effect}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>类别:</span>
- <div>{{agreeInfo.type=='0'?'组方':'配方'}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>明细:</span>
- <div class="detail">
- <p class="flex-center btns" @click="agreeTurnRecipe(agreeInfo)">转方</p>
- <p class="drug-detail flex-plane-center-l flex-wrap">
- <span
- v-for="(item,index) in agreeInfo.preStiDetails"
- :key="item.ypmc+index"
- >{{item.ypmc}}{{item.dose}}{{item.dw}}</span>
- </p>
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>分享医生:</span>
- <div>{{agreeInfo.createName}}</div>
- </div>
- </div>
- </Popup>
- <!-- 专家经验 -->
- <Popup
- :showDialog="showExpr"
- distanceTop="5vh"
- @cancle="showExpr=false"
- title="专家经验"
- :showBtns="false"
- width="700px"
- >
- <div class="drug-body" slot="body">
- <div class="drug-item flex-plane-center-l">
- <span>方名:</span>
- <div>{{exprInfo.name}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>方解:</span>
- <div>{{exprInfo.solution}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>功效适应症:</span>
- <div>{{exprInfo.effect}}</div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>明细:</span>
- <div class="detail">
- <div class="trun-join">
- <p class="flex-center btns" @click="turnRecipe3(exprInfo)">转方</p>
- <p class="flex-center btns bg-yellow" @click="joinRecipe3(exprInfo)">合方</p>
- </div>
- <p class="drug-detail flex-plane-center-l flex-wrap">
- <span
- v-for="item in exprInfo.prescriptionDetailVos"
- :key="item.drugname+item.pid"
- >{{item.drugname}}{{item.dose}}{{item.unit}}</span>
- </p>
- </div>
- </div>
- <div class="drug-item flex-plane-center-l">
- <span>专家名称:</span>
- <div>{{exprInfo.expert}}</div>
- </div>
- </div>
- </Popup>
- <!-- 名家验案详情 -->
- <Popup
- :showDialog="showTestCase"
- distanceTop="5vh"
- @cancle="showTestCase=false"
- title="名家验案详情"
- :showBtns="false"
- width="700px"
- >
- <div slot="body" class="testCase">
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">性别:</span>
- <div class="testCase-right">{{testCaseInfo.patientgender=='M'?'男':'女'}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">年龄:</span>
- <div class="testCase-right">{{testCaseInfo.patientage}}岁</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">婚姻:</span>
- <div class="testCase-right">{{testCaseInfo.patientmarriage=='0'?'未婚':'已婚'}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l" v-if="testCaseInfo.dialist">
- <span class="testCase-left">主诉及现病史:</span>
- <div class="testCase-right">{{testCaseInfo.dialist[0].situation}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">辩证:</span>
- <div class="testCase-right">{{testCaseInfo.chinesesymptom}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">治法:</span>
- <div class="testCase-right">{{testCaseInfo.therapy}}</div>
- </div>
- <div v-for="(item,index) in testCaseInfo.dialist" :key="index">
- <div class="testCase-title">{{index==0?'初诊':item.diatimes+'诊'}}</div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">就诊日期:</span>
- <div class="testCase-right">{{item.checktime[0]}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">治疗意见:</span>
- <div
- class="testCase-right"
- v-for="(item1,index1) in item.fjlist"
- :key="item1.preusage+index1"
- >
- <div class="flex-vertical-center-l case-yijian">
- <span>{{item1.preusage}}</span>
- <div class="testCase-btns flex-center" @click="turnRecipe(item1)">转方</div>
- </div>
- <div class="flex-vertical-center-l flex-wrap case-detial">
- <span
- v-for="(item2,index2) in item1.verpreitemlist"
- :key="item2.matname+index2"
- >{{item2.matname}}{{item2.dose}}{{item2.unit}}</span>
- </div>
- </div>
- </div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">按语:</span>
- <div class="testCase-right">{{testCaseInfo.words}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">来源:</span>
- <div class="testCase-right">{{testCaseInfo.book}}</div>
- </div>
- </div>
- </Popup>
- <!-- 就诊记录详情 -->
- <Popup :showDialog="showRecord" @cancle="showRecord=false" title="就诊记录详情" :showBtns="false">
- <div slot="body" class="testCase" v-if="recordInfo.patient">
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">姓名:</span>
- <div class="testCase-right">{{recordInfo.patient.name}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">性别:</span>
- <div class="testCase-right">{{recordInfo.patient.sex}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">年龄:</span>
- <div class="testCase-right">{{recordInfo.patient.age}}岁</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">医疗机构:</span>
- <div class="testCase-right">{{recordInfo.patient.institutionidSelsourceName}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">科室名称:</span>
- <div class="testCase-right">{{recordInfo.patient.institutionidSelsourceName}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">诊断:</span>
- <div class="testCase-right">
- <div>中医诊断:{{recordInfo.mainDiagnosis.namemedicine?recordInfo.mainDiagnosis.namemedicine:'无'}}</div>
- <div>西医诊断:{{recordInfo.mainDiagnosis.diagnosis?recordInfo.mainDiagnosis.diagnosis:'无'}}</div>
- </div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">治疗意见:</span>
- <div
- class="testCase-right"
- v-for="(item,index) in recordInfo.patientprescription"
- :key="'i'+index"
- >
- <div class="flex-vertical-center-l case-yijian">
- <span>{{item.type=='0'?'中药处方'+(index+1):item.type=='1'?'中药制剂':'适宜技术处方'}}</span>
- <div class="testCase-btns flex-center" @click="turnRecipe1(item)">转方</div>
- </div>
- <div class="flex-vertical-center-l flex-wrap case-detial">
- <span
- v-for="(item1,index1) in item.myPatientDetailVos"
- :key="item1.name+index1"
- >{{item1.name}}{{item1.num}}{{item1.unit}}</span>
- </div>
- </div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">开方医生:</span>
- <div
- class="testCase-right"
- >{{recordInfo.patientprescription.length>0?recordInfo.patientprescription[0].updateUser:'无'}}</div>
- </div>
- <div class="testCase-item flex-plane-center-l">
- <span class="testCase-left">时间:</span>
- <div
- class="testCase-right"
- >{{recordInfo.patientprescription.length>0?recordInfo.patientprescription[0].updateTime:'无'}}</div>
- </div>
- </div>
- </Popup>
- <!-- 处方预览 -->
- <submitRecipe :show.sync="showPriview" :priviewData="priviewData"></submitRecipe>
- <!-- <div style="position:fixed;top:0;z-index:9999;width:100vw;">
- <suitMadePad></suitMadePad>
- </div>-->
- <!--参考医案例 页面768-->
- <Popup
- :showDialog="showCase"
- @cancle="showCase=false"
- title="参考医案"
- :showBtns="false"
- width="700px"
- distanceTop="5vh"
- >
- <div slot="body">
- <doctorCase :searchKey="agree_key1"></doctorCase>
- </div>
- </Popup>
- <!-- 查询协定方 方剂 页面768 -->
- <Popup
- :showDialog="showPresc"
- @cancle="showPresc=false"
- title="查询方剂/查询协定方"
- :showBtns="false"
- width="700px"
- distanceTop="5vh"
- >
- <div slot="body">
- <prescription></prescription>
- </div>
- </Popup>
- <!-- 查询统建处方 页面768 -->
- <Popup
- :showDialog="showUnifyPresc"
- @cancle="showUnifyPresc=false"
- title="查询统建处方"
- :showBtns="false"
- width="700px"
- distanceTop="5vh"
- >
- <div slot="body">
- <UnifyPrescription></UnifyPrescription>
- </div>
- </Popup>
- <!-- 查询舌象分析 页面768 -->
- <Popup
- :showDialog="showTongueAnalysis"
- @cancle="showTongueAnalysis=false"
- title="萧山区中医健康微管家"
- :showBtns="false"
- width="70%"
- distanceTop="5vh"
- >
- <div style="height: 100%" slot="body">
- <TongueAnalysis v-if="showTongueAnalysis" :dataset="tongueAndFaceAnalysis"></TongueAnalysis>
- </div>
- </Popup>
- <!-- 安全合理用药弹窗 -->
- <!-- 查询协定方 方剂 页面768 -->
- <Popup
- :showDialog.sync="showSafeD"
- @cancle="showSafeD=false"
- title="安全合理用药检测"
- :showBtns="false"
- width="700px"
- distanceTop="5vh"
- :destroyOnClose="true"
- >
- <div slot="body">
- <safeDrug v-if="showSafeD"></safeDrug>
- </div>
- </Popup>
- <!-- 选择代煎 地址栏 -->
- <Popup
- :showDialog="showAddress"
- @cancle="showAddress=false"
- @confim="submitAddress"
- title="请和患者确认以下信息"
- width="700px"
- distanceTop="5vh"
- >
- <div slot="body">
- <medAdressNew
- ref="medAdress"
- @psChange="psChange"
- @djChange="djChange"
- :isDaijian="Number(isDaiJian)"
- :isPs="Number(isPs)"
- :isShowDj="isShowDj"
- :isShowPs="isShowPs"
- ></medAdressNew>
- </div>
- </Popup>
- </div>
- </template>
- <script>
- import Popup from "@/components/Propup.vue";
- import chineseMedicine from "@/components/ChineseMedicine.vue";
- import medicineChinese from "@/components/MedicineAndChina.vue";
- import suitScience from "@/components/SuitScience.vue";
- import submitRecipe from "./components/submitRecipe.vue";
- // import TCMDiagnosis from "./components/TCMDiagnosis.vue";
- import TCMDiagnosis from "../../components/TCMDiagnosis.vue";
- import doctorCase from "./components/doctorCase.vue";
- import prescription from "./components/prescription.vue";
- import UnifyPrescription from "./components/prescription-unify.vue";
- import TongueAnalysis from "./components/tongue-analysis.vue";
- import safeDrug from "./components/safeDrug.vue";
- import medAdress from "./components/medAddress.vue";
- import medAdressNew from "./components/medAddressNew.vue";
- import {
- getPatiensBasisM,
- getTongueAndFaceAnalysisRecords,
- addRecipe,
- getRecipeShowData,
- getRecipeDataByid,
- getAgreeRecipe,
- getSeeDByID,
- getDrugDetail,
- getAccordDetail,
- changeBasisPre,
- updateRecipe,
- changeExpre,
- recipeIsPay,
- getPreNumber,
- getRecipePriview,
- getMaxMinDoaseNumber
- } from "@/api/diagnosis.js";
- import { numberToUpperCase } from "@/utils/format.js";
- import { addRecipeFrom } from "@/api/dataAnalysis.js";
- import {
- getPrescriptionsList,
- getDoctorCaseL,
- getRationalMed,
- getRationalMedForPlat,
- inferRecipe,
- getDCaseDetail,
- changeAndJoin,
- getPreDetal,
- getAcupointD,
- getMedDetail
- } from "@/api/knowledge.js";
- import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
- import { getExperinceDetail } from "@/api/business.js";
- import { setTimeout } from "timers";
- import prescribing from "../../utils/minix/prescribing";
- import {formatPicture} from "@/utils/picture";
- export default {
- mixins: [prescribing],
- components: {
- Popup,
- chineseMedicine,
- medicineChinese,
- suitScience,
- TCMDiagnosis,
- submitRecipe,
- prescription,
- UnifyPrescription,
- TongueAnalysis,
- doctorCase,
- safeDrug,
- medAdress,
- medAdressNew
- },
- data() {
- return {
- tongueAndFaceLoading: false, // 舌面象加载
- tongueAndFaceAnalysis: null, // 舌面象数据
- showTongueAnalysis: false, // 舌象分析弹窗
- showPriview: false, // 展示预览数据
- showDialog: false, // 方剂详情
- showDrug: false, // 药品详情
- showAgree: false, // 协定方
- showTestCase: false, // 名医验案
- showRecord: false, // 就诊记录
- showXuewei: false, // 穴位详情信息
- showTestCase: false, // 名医验案
- isTuiDaoSuit: false, //适宜技术处方是否推导过
- isTuiDataZy: false, // 中药处方是否推导过
- raDoseShow: false,
- tjRecipeId: "", // 当前选中推荐 方剂的 id
- isMyMade: true, // 是否是自拟处方
- showExpr: false, // 专家经验
- priviewData: {}, // 预览数据
- exprInfo: {}, // 专家经验信息
- // 名医弹窗信息
- testCaseInfo: {},
- // 就诊记录 弹窗信息
- recordInfo: {},
- //药品弹窗信息
- drugInfo: {},
- xwinfo: {},
- // 方剂弹窗信息
- preInfo: {},
- // 协定方弹窗信息
- agreeInfo: {},
- // 右侧搜索
- agree_key: "",
- agree_key1: "",
- key: "",
- // 推荐方剂 下标
- r_current: 0,
- // 协定方下标
- agree_current: 0,
- // 协定方手风琴 选中
- activeNames: "0",
- activeNamesLast: "0",
- // 右侧手风琴面板数据
- collapseData: [
- {
- name: "个人",
- index: "0",
- page: 1,
- loadMore: true,
- list: []
- },
- {
- name: "二级科室",
- index: "1",
- page: 1,
- loadMore: true,
- list: []
- },
- {
- name: "科室",
- index: "2",
- page: 1,
- loadMore: true,
- list: []
- },
- {
- name: "本院",
- index: "3",
- page: 1,
- loadMore: true,
- list: []
- }
- ],
- // 右侧方剂列表
- rPrescription: {
- list: [],
- page: 1,
- loadMore: true,
- key: ""
- },
- // 右侧参考医案
- rDoctorCase: {
- list: [],
- page: 1,
- loadMore: true,
- key: ""
- },
- // 保存右侧合理用药信息
- rationalMed: [],
- // 从1-9 分别对应 超剂量 到 19反
- rationalMed1: [],
- rationalMed2: [],
- rationalMed3: [],
- rationalMed4: [],
- rationalMed5: [],
- rationalMed6: [],
- rationalMed7: [],
- rationalMed8: [],
- rationalMed9: [],
- rationalMed10: [],
- // 右侧推荐方剂
- rRecomendR: [],
- // 中间顶部tab
- container_i: 0,
- contentTabs: [
- {
- name: "中药处方",
- check: true,
- color: ""
- },
- {
- name: "中药制剂",
- check: false,
- hide: true,
- color: ""
- },
- {
- name: "适宜技术处方",
- check: false,
- hide: true,
- color: ""
- }
- ],
- patiensMsg: {}, // 患者信息
- dianosisMsg: [], // 诊断信息
- ops: {
- vuescroll: {},
- scrollPanel: {},
- rail: {
- keepShow: true
- },
- bar: {
- hoverStyle: true,
- onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
- background: "#C1C1C1", //滚动条颜色
- opacity: 0.5, //滚动条透明度
- "overflow-x": "hidden"
- }
- },
- showSubmit: true,
- // refs 信息暂存
- chineseM: {
- allMoney: 0,
- recipeTabs: []
- },
- medicineC: {
- allMoney: 0
- },
- suitScience: {
- allMoney: 0
- }
- };
- },
- created() {
- // console.log(this.getIsSee, 'issee');
- this.showSubmit = String(this.getIsSee) == "true" ? true : false;
- // 获取右侧协定方数据
- this.getAgreeRecipe();
- if (this.getPatiensInfo.pid) {
- this.getPatiensBasisM();
- this.getPatientBasisTongueAndFaceAnalysis();
- }
- },
- mounted() {
- this._processRouteQuery();
- },
- beforeRouteLeave(to, from, next) {
- if (to.path == "/index/recipe") {
- sessionStorage.removeItem("prescr" + this.getPatiensInfo.pid);
- next();
- } else {
- this._setDataToStorage(next);
- }
- },
- watch: {
- rationalMed10: {
- deep: true,
- immediate: true,
- handler: function() {
- this.countDose();
- }
- }
- },
- methods: {
- // 处理路由参数
- async _processRouteQuery() {
- const query = this.$route.query || {};
- // 暂存处方数据(不含药品)
- if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage(true);
- // 名医名方 —> 方剂查询
- if (query.recipeID && query.kjType === "kj-fj") await this.getPreDetal(query.recipeID);
- // 名医名方 —> 名医医案
- else if (query.doctorCase) await this.changeAndJoin();
- // 中医诊疗 -> 智能辩证
- else if (query.type === "tuidao") {
- await Promise.all([
- this.inferRecipe(4, "1"),
- this.inferRecipe(4, "3"),
- this.inferRecipe(),
- ])
- this.isTuiDaoZy = true;
- }
- // 处方编辑 recipeType
- else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
- // 暂存处方
- else if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage();
- // 历史处方
- else {
- // 跟据就诊记录id获取处方号
- let res = await getPreNumber({pid: this.getPatiensInfo.pid}).catch(() => void 0);
- const has = res && res.ResultCode == 0 && res.Data.length > 0;
- if (has) await this.getRecipeShowData();
- }
- },
- // 参考医案
- // 中医诊断推导点击
- tcmClick(isauto = true) {
- let params = this.$refs.TCM.getParams();
- if (!params.namemedicine || !params.syndrometypes) {
- this.$message.warning("请完善病名证型信息");
- return;
- }
- let newDiaMsg = this.$refs.TCM.getDiamsg();
- this.agree_key1 = params.namemedicine;
- this.patiensMsg.maindiagnosis.disid = newDiaMsg.disid;
- this.patiensMsg.maindiagnosis.symptomid = newDiaMsg.symptomid;
- this.patiensMsg.maindiagnosis.treatment = newDiaMsg.treatment;
- // 获取最新病名的参考医案
- this.rDoctorCase.page = 1;
- this.rDoctorCase.list = [];
- this.rDoctorCase.loadMore = true;
- this.getDoctorCaseL();
- // --end
- if (isauto) {
- this.inferRecipe(2);
- }
- setTimeout(() => {
- this.inferRecipe(4, "1");
- this.inferRecipe(4, "3");
- if (this.getPatiensInfo.pid) {
- this.getPatiensBasisM();
- }
- }, 1000);
- },
- // 系统数据存入缓存
- _setDataToStorage(next) {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child1 = children[0];
- let child2 = children[1];
- let child3 = children[2];
- let obj = {
- container_i: this.container_i,
- child1: {
- recipe_tabs: child1.recipe_tabs,
- recipe_tabs_c: child1.recipe_tabs_c
- },
- child2: {
- tableData3: child2.tableData3,
- bottom_form: child2.bottom_form
- },
- child3: {
- tableData4: child3.tableData4,
- listLeft: child3.listLeft,
- listRight: child3.listRight,
- bottom_form: child3.bottom_form
- },
- rationalMed: {
- // 保存右侧合理用药信息
- rationalMed: this.rationalMed,
- // 从1-9 分别对应 超剂量 到 19反
- rationalMed1: this.rationalMed1,
- rationalMed2: this.rationalMed2,
- rationalMed3: this.rationalMed3,
- rationalMed4: this.rationalMed4,
- rationalMed5: this.rationalMed5,
- rationalMed6: this.rationalMed6,
- rationalMed7: this.rationalMed7,
- rationalMed8: this.rationalMed8,
- rationalMed9: this.rationalMed9,
- rationalMed10: this.rationalMed10
- }
- };
- sessionStorage.setItem(
- "prescr" + this.getPatiensInfo.pid,
- JSON.stringify(obj)
- );
- next();
- // getPatiensInfo
- },
- // 展示系统缓存数据
- async _showDataFromStorage(ignoreTable = false) {
- let storageData = JSON.parse(
- sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)
- );
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child1 = children[0];
- let child2 = children[1];
- let child3 = children[2];
- if (typeof child1.loaded === 'function') await child1.loaded(storageData.child1);
- if (storageData.child1.recipe_tabs[0].totalTableD.length > 1) {
- this.isTuiDaoZy = true;
- }
- if (storageData.child3.tableData4.length > 1) {
- this.isTuiDaoZy = true;
- }
- if (ignoreTable) {
- for (const recipe of storageData.child1.recipe_tabs) {
- recipe.tableData = [];
- recipe.tableData1 = [];
- recipe.totalTableD = [];
- }
- storageData.child2.tableData3 = [];
- storageData.child3.tableData4 = [];
- }
- this.container_i = storageData.container_i;
- child1.recipe_tabs = storageData.child1.recipe_tabs;
- child1.recipe_tabs_c = storageData.child1.recipe_tabs_c;
- // child1.getSelectType("剂型", 0);
- // child1.getSelectType("处方用法");
- // child1.getSelectType("中药服药时间");
- // child1.getSelectType("中药频次");
- // child1.getPharmacyID();
- child2.tableData3 = storageData.child2.tableData3;
- child2.bottom_form = storageData.child2.bottom_form;
- child3.tableData4 = storageData.child3.tableData4;
- child3.listLeft = storageData.child3.listLeft;
- child3.listRight = storageData.child3.listRight;
- child3.bottom_form = storageData.child3.bottom_form;
- this.rationalMed = storageData.rationalMed.rationalMed;
- // 保存右侧合理用药信息
- // 从1-9 分别对应 超剂量 到 19反
- this.rationalMed1 = storageData.rationalMed.rationalMed1;
- this.rationalMed2 = storageData.rationalMed.rationalMed2;
- this.rationalMed3 = storageData.rationalMed.rationalMed3;
- this.rationalMed4 = storageData.rationalMed.rationalMed4;
- this.rationalMed5 = storageData.rationalMed.rationalMed5;
- this.rationalMed6 = storageData.rationalMed.rationalMed6;
- this.rationalMed7 = storageData.rationalMed.rationalMed7;
- this.rationalMed8 = storageData.rationalMed.rationalMed8;
- this.rationalMed9 = storageData.rationalMed.rationalMed9;
- this.rationalMed10 = storageData.rationalMed.rationalMed10;
- },
- // 方剂顶部搜索
- searchPre() {
- if (this.agree_current == 1) {
- this.rPrescription.page = 1;
- this.rPrescription.list = [];
- this.rPrescription.loadMore = true;
- this.getPrescriptionsList();
- } else if (this.agree_current == 2) {
- this.rDoctorCase.page = 1;
- this.rDoctorCase.list = [];
- this.rDoctorCase.loadMore = true;
- this.getDoctorCaseL();
- }
- },
- // 方剂加载更多
- loadMorePre() {
- if (this.agree_current == 1) {
- if (!this.rPrescription.loadMore) {
- this.$message({
- showClose: false,
- message: "没有更多数据了",
- type: "warning "
- });
- return;
- }
- this.getPrescriptionsList(this.rPrescription.loadMore);
- } else if (this.agree_current == 2) {
- if (!this.rDoctorCase.loadMore) {
- this.$message({
- showClose: false,
- message: "没有更多数据了",
- type: "warning "
- });
- return;
- }
- this.getDoctorCaseL(this.rDoctorCase.loadMore);
- }
- },
- // 加载更多协定方数据
- loadMoreCollapse(item) {
- if (!item.loadMore) {
- this.$message({
- showClose: false,
- message: "没有更多数据了",
- type: "warning "
- });
- return;
- }
- this.getAgreeRecipe(item.loadMore);
- },
- // 手风琴 更改
- activeChange(e) {
- console.log(e, "手风琴该表");
- // if (this.activeNames == e) return;
- if (e) {
- this.activeNames = e;
- this.activeNamesLast = e;
- this.collapseData[this.activeNames].page = 1;
- this.collapseData[this.activeNames].loadMore = true;
- this.collapseData[this.activeNames].list = [];
- this.getAgreeRecipe(this.collapseData[this.activeNames].loadMore);
- } else {
- this.activeNames = this.activeNamesLast;
- }
- },
- // 处理中药处方提交数据
- dealRecipe1() {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[0];
- let isAutoCheck = data1.isAutoCheck;
- let hasDoseNum = true; // 是否有剂数
- let hasData = true; // 是否有处方药品数据
- let hasAddress = true;
- let noFull = false; // 是否有药品库存不足
- let recipeAlert = [];
- data1.recipe_tabs.forEach((item, index) => {
- if (item.isMyMade) {
- this.addRecipeFrom("3");
- }
- if (!item.bottom_form.doseNum) {
- hasDoseNum = false;
- }
- if (item.bottom_form.radio == "0" && !item.bottom_form.savename) {
- hasAddress = false;
- }
- if (item.bottom_form.radio == "0" && !item.bottom_form.phone) {
- hasAddress = false;
- }
- if (item.bottom_form.radio == "0" && !item.bottom_form.province) {
- hasAddress = false;
- }
- if (item.bottom_form.radio == "0" && !item.bottom_form.city) {
- hasAddress = false;
- }
- if (item.bottom_form.radio == "0" && !item.bottom_form.area) {
- hasAddress = false;
- }
- if (item.bottom_form.radio == "0" && !item.bottom_form.address) {
- hasAddress = false;
- }
- if (item.totalTableD.length < 2) {
- hasData = false;
- }
- if (item.totalTableD.length - 1 < this.doseMin) {
- recipeAlert.push({
- text: `中药处方${index + 1}不符合最小药味数${this.doseMin}!`,
- isAllow: this.doseAllowMin
- });
- }
- if (item.totalTableD.length - 1 > this.doseMax) {
- recipeAlert.push({
- text: `中药处方${index + 1}不符合最大药味数${this.doseMax}!`,
- isAllow: this.doseAllowMax
- });
- }
- item.totalTableD.forEach(item1 => {
- if (item1.color == "red") {
- noFull = true;
- }
- if (!item1.dose && item1.name) {
- hasDoseNum = false;
- }
- });
- });
- if (!hasData) {
- this.$message.error({
- message: "请完善中药处方药品信息",
- showClose: false,
- type: "error"
- });
- return [];
- }
- if (recipeAlert.length > 0) {
- recipeAlert.forEach(item => {
- if (item.text) {
- setTimeout(() => {
- this.$message({
- message: item.text,
- showClose: true,
- type: "warning"
- });
- }, 200);
- }
- });
- // return false;
- }
- // if (!hasAddress) {
- // this.$message({
- // message: "请完善中药处方配送信息",
- // showClose: false,
- // type: "error"
- // });
- // return false;
- // }
- if (!hasDoseNum) {
- this.$message.error({
- message: "请完善中药处方剂数剂量信息",
- showClose: false,
- type: "error"
- });
- return false;
- }
- if (noFull) {
- this.$message.error({
- message: "部分药品库存不足",
- showClose: false,
- type: "error"
- });
- return false;
- }
- console.log(recipeAlert, "recipeAlert");
- // let data2 = children[1]
- // let data3 = children[2]
- let zhongPrescriptionVo = [];
- let medAdressData = {};
- if (this.showAddress) {
- medAdressData = this.$refs.medAdress.form;
- }
- data1.recipe_tabs.forEach((item, index) => {
- let obj = {
- seqn: index + 1,
- province:
- this.isShowPs && this.showAddress ? medAdressData.province : "", // 省
- city: this.isShowPs && this.showAddress ? medAdressData.city : "", // 市
- district: this.isShowPs && this.showAddress ? medAdressData.area : "", // 区
- address:
- this.isShowPs && this.showAddress ? medAdressData.address : "", // 详细地址
- agency: item.bottom_form.isDaiJian, // 代煎
- // agency: this.showAddress ? medAdressData.isDaiJian : 0, // 代煎
- // agency: this.isShowDj ? this.isDaiJian : 0, // 代煎
- allprice: item.bottom_form.allMoney, // 总金额(合计金额)
- command: item.bottom_form.zhutuo, // 嘱托
- consigneeName:
- this.isShowPs && this.showAddress ? medAdressData.savename : "", // 收货人姓名
- consigneePhone:
- this.isShowPs && this.showAddress ? medAdressData.phone : "", // 收货人电话
- deliveryfree:
- medAdressData.radio == 0 && this.isShowPs && this.showAddress
- ? item.bottom_form.moneyMsg.deliveryPrice
- : 0, // 配送费
- deploymentfree:
- item.bottom_form.doseType == "2" || item.bottom_form.doseType == "3"
- ? item.bottom_form.moneyMsg.specialDeploymentPrice
- : 0, // 特殊调配费
- dosageForm: item.bottom_form.doseType, // 剂型
- eatMedicineTime: item.bottom_form.time, // 服药时间
- frequency: item.bottom_form.num, // 频次
- friedfree: item.bottom_form.daijian
- ? item.bottom_form.moneyMsg.agencyPrice
- : 0, // 代煎费
- // isdelivery: this.isPs == 1 ? 0 : 1, // 是否配送
- isdelivery: item.bottom_form.radio,
- markfree:
- item.bottom_form.doseType == "0"
- ? item.bottom_form.moneyMsg.systemOfCreamPrice
- : 0, // 制膏费
- num: item.bottom_form.doseNum, //剂数
- pharmacyid: item.pharmacyID, // 药房id 暂时写死
- drugtype: item.radio.split("@")[1], // 药房类型
- price: item.bottom_form.nowRecipeMoney, // 单剂金额
- recordid: this.getPatiensInfo.pid, //门诊id
- strongFried: item.bottom_form.nongjian, //浓煎
- type: 0, // 处方类型
- useexplain: item.bottom_form.caozuo, // 操作指南
- usestr: item.bottom_form.usege, //处方用法
- zhongdetail: [], // 中药明细 表格内部数据
- // preId: this.$route.query.recipeID ? this.$route.query.recipeID : ""
- preId: item.preId ? item.pageId : ""
- };
- item.totalTableD.forEach(item1 => {
- if (item1.name && item1.color != "red") {
- let obj1 = {
- allprice: item1.total,
- dose: Number(item1.dose),
- drugName: item1.name,
- drugid: item1.medid,
- origin: item1.originname,
- seqn: item1.id,
- specification: item1.spec,
- unit: item1.unit,
- unitprice: item1.price,
- usagestr: item1.usage,
- preDetailId: this.getEditPreNo(),
- };
- obj.zhongdetail.push(obj1);
- }
- });
- if (!recipeAlert[index]) {
- recipeAlert.push({
- isAllow: 0
- });
- }
- // 当前审核流程为自动时 用his 的支付状态判断
- // if (isAutoCheck == 1) {
- // } else {
- // if (
- // !item.isPay &&
- // (item.prescribed == 0 || !item.prescribed) &&
- // recipeAlert[index].isAllow == 0
- // ) {
- // zhongPrescriptionVo.push(obj);
- // }
- // }
- if (
- (item.paystate == 0 || !item.paystate) &&
- recipeAlert[index].isAllow == 0
- ) {
- zhongPrescriptionVo.push(obj);
- }
- });
- return zhongPrescriptionVo;
- },
- // 处理中成药处方提交数据
- dealRecipe2() {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[1];
- let isAutoCheck = data1.isAutoCheck;
- if (data1.tableData3.length == 1) {
- // this.$message.error("请完善中成药处方药品信息");
- return {};
- }
- let hasDrugMsg = [];
- data1.tableData3.forEach((item, index) => {
- if (
- item.name &&
- (!item.dose || !item.usage || !item.timesQuan || !item.nums)
- ) {
- // || !item.time
- hasDrugMsg.push(index + 1);
- }
- });
- if (hasDrugMsg.length > 0) {
- this.$message.error(
- "请完善中药制剂处方药品相关信息(序号:" + hasDrugMsg.join(",") + ")"
- );
- return false;
- }
- let hasAddress = true;
- let medAdressData = {};
- if (this.showAddress) {
- medAdressData = this.$refs.medAdress.form;
- }
- this.addRecipeFrom("3");
- let obj = {
- province:
- this.showAddress && this.isShowPs ? medAdressData.province : "", // 省
- city: this.showAddress && this.isShowPs ? medAdressData.city : "", // 市
- district: this.showAddress && this.isShowPs ? medAdressData.area : "", // 区
- address: this.showAddress && this.isShowPs ? medAdressData.address : "",
- command: data1.bottom_form.zhutuo,
- consigneeName:
- this.showAddress && this.isShowPs ? medAdressData.savename : "",
- consigneePhone:
- this.showAddress && this.isShowPs ? medAdressData.phone : "",
- isdelivery: data1.bottom_form.radio,
- // isdelivery: this.isPs == 0 ? 1 : 0,
- deliveryfree:
- this.showAddress && this.isShowPs && medAdressData.radio == 0
- ? data1.moneyMsg.deliveryPrice
- : 0, // 配送费
- pharmacyid: data1.pharmacyID,
- type: 1,
- chengDetail: [],
- // preId: this.$route.query.recipeID ? this.$route.query.recipeID : ""
- preId: data1.preId ? data1.pageId : ""
- };
- data1.tableData3.forEach(item => {
- if (item.name) {
- let obj1 = {
- allprice: item.total,
- dose: item.dose,
- drugName: item.name,
- drugid: item.medid,
- frequency: item.nums,
- medicationtime: item.time,
- origin: item.from,
- price: item.price,
- secondDose: item.timesQuan,
- seqn: item.id,
- specification: item.spec,
- unit: item.unit,
- usagestr: item.usage,
- preDetailId: this.getEditPreNo(),
- bzdw: item.doseUnit,
- zxdw: item.timesUnit
- };
- obj.chengDetail.push(obj1);
- }
- });
- // if ((data1.isPay || data1.prescribed == 1) && isAutoCheck == 0) {
- // return {};
- // }
- // && isAutoCheck == 1
- if (data1.paystate == 1) {
- return {};
- }
- return obj;
- },
- // 处理适宜剂数处方提交数据
- dealRecipe3() {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[2];
- let isAutoCheck = data1.isAutoCheck;
- if (data1.tableData4.length == 1) {
- // this.$message.error('请完善适宜技术处方药品信息')
- return {};
- }
- let hasDrugMsg = [];
- data1.tableData4.forEach((item, index) => {
- if (!item.name && index != data1.tableData4.length - 1) {
- hasDrugMsg.push(index + 1);
- }
- });
- if (hasDrugMsg.length > 0) {
- // this.$message.error(
- // "请完善适宜技术处方药品相关信息(序号:" + hasDrugMsg.join(",") + ")"
- // );
- return false;
- }
- if (!data1.bottom_form.doseNum1) {
- this.$message.error({
- message: "请完善适宜技术处方次数信息",
- showClose: false,
- type: "error"
- });
- return false;
- }
- if (!data1.bottom_form.doseType1) {
- this.$message.error({
- message: "请完善适宜技术处方类型信息",
- showClose: false,
- type: "error"
- });
- return false;
- }
- let obj = {
- command: data1.bottom_form.zhutuo,
- num: Number(data1.bottom_form.doseNum1),
- technologyType: data1.bottom_form.doseType1,
- type: 2,
- useexplain: data1.bottom_form.caozuo,
- // preId: this.$route.query.recipeID ? this.$route.query.recipeID : "",
- preId: data1.preId ? data1.pageId : "",
- detail: []
- };
- data1.tableData4.forEach(item => {
- if (item.name) {
- let obj1 = {
- pointid: item.acuid,
- pointname: item.acuname,
- price: data1.bottom_form.doseType,
- seqn: item.id,
- preDetailId: this.getEditPreNo(),
- };
- obj.detail.push(obj1);
- }
- });
- if (data1.isMyMade) {
- this.addRecipeFrom("3");
- }
- // if ((data1.isPay || data1.prescribed == 1) && isAutoCheck == 0) {
- // return {};
- // }
- // && isAutoCheck == 1
- if (data1.paystate == 1) {
- return {};
- }
- return obj;
- },
- // 获取数据 赋值给 中药处方
- assignRecipe1(data, loading) {
- setTimeout(() => {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[0];
- let isAutoCheck = data1.isAutoCheck;
- let arr = [];
- data.forEach((item, index) => {
- let objAssaign = {};
- // let medAdressData = this.$refs.medAdress;
- let obj = {
- name: "处方1",
- pharmacyID: "", // 药房id
- totalTableD: [],
- tableData: [
- {
- id: 1
- }
- ],
- radio: "1",
- tableData1: [],
- bottom_form: {
- doseNum: "",
- doseType: "",
- doseTypeList: [],
- usegeList: [],
- usege: "",
- num: "",
- numList: [], // 频次后台数据
- daijian: "",
- nongjian: "",
- time: "",
- timeList: [], // 服药时间后台数据
- caozuo: "",
- zhutuo: "",
- radio: item.isdelivery,
- daijian: "1",
- provinceList: [],
- cityList: [],
- areaList: [],
- province: "",
- city: "",
- area: "",
- address: "",
- phone: "",
- doseType1: "",
- doseNum1: "",
- savename: "",
- nowRecipeMoney: 0, //单剂金额
- nowRecipeMoney1: 0, //当前处方金额
- allMoney: 0, // 合计金额
- moneyMsg: {} // 价格数据
- },
- prescribed: 0, //是否开方 0 否 1 是,
- paystate: 0,
- preId: null
- };
- // if (
- // index == data.length - 1 &&
- // item.prescribed == 1 &&
- // isAutoCheck == 0
- // ) {
- // objAssaign = JSON.parse(JSON.stringify(obj));
- // }
- // && isAutoCheck == 1
- if (index == data.length - 1 && item.paystate == 1) {
- objAssaign = JSON.parse(JSON.stringify(obj));
- }
- if (this.$route.query.type == "edit") {
- } else {
- }
- obj.preId = item.preId ? item.preId : "";
- obj.name = "处方" + (index + 1);
- obj.radio = item.pharmacyid + "@" + item.drugtype;
- obj.pharmacyID = item.pharmacyid;
- obj.bottom_form.doseNum = item.num;
- obj.bottom_form.doseType = item.dosageForm;
- obj.bottom_form.usege = item.usestr;
- obj.bottom_form.nongjian = item.strongFried;
- obj.bottom_form.num = item.frequency;
- obj.bottom_form.caozuo = item.useexplain;
- obj.bottom_form.zhutuo = item.command;
- if (!!this.getEditPreNo()) {
- if (item.revierwstate == 1 && isAutoCheck == 0) {
- obj.prescribed = 0;
- } else {
- obj.prescribed = item.prescribed;
- }
- obj.paystate = item.paystate;
- // if (isAutoCheck == 1) {
- // }
- obj.bottom_form.radio = Number(item.isdelivery);
- obj.bottom_form.savename = item.consigneeName;
- obj.bottom_form.phone = item.consigneePhone;
- obj.bottom_form.address = item.address;
- obj.bottom_form.province = item.province;
- obj.bottom_form.city = item.city;
- obj.bottom_form.area = item.district;
- if (obj.paystate == 1) {
- obj.bottom_form.disable = true;
- obj.disable = true;
- }
- } else {
- obj.prescribed = item.prescribed;
- obj.paystate = item.paystate;
- if (obj.paystate == 1) {
- obj.bottom_form.disable = true;
- obj.disable = true;
- }
- }
- obj.bottom_form.moneyMsg = {
- deliveryPrice: item.deliveryfree,
- specialDeploymentPrice: item.deploymentfree,
- agencyPrice: item.friedfree,
- systemOfCreamPrice: item.markfree
- };
- //
- obj.bottom_form.daijian = item.agency;
- obj.bottom_form.isDaiJian = Number(item.agency);
- // medAdressData.isDaiJian = Number(item.agency);
- obj.bottom_form.nowRecipeMoney = item.price;
- obj.bottom_form.nowRecipeMoney1 = item.thisRecipePrice;
- obj.bottom_form.allMoney = item.allprice;
- obj.bottom_form.time = item.eatMedicineTime;
- // data1.getProver()
- obj.bottom_form.provinceList = data1.provinceList1;
- if (item.isdelivery == "0") {
- data1.recipe_tabs_c = index;
- data1.getArea(item.province, 1);
- data1.getArea(item.city, 2);
- }
- setTimeout(() => {
- data1.recipeChange(index);
- }, 500);
- item.zhongdetail.forEach((item1, index1) => {
- let obj1 = {
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- id: item1.seqn,
- name: item1.drugName,
- spec: item1.specification, // 规格
- dose: item1.dose, // 剂量
- unit: item1.unit, // 单位
- // usage: item.usagestr, // 用法
- usage: item1.usagestr,
- price: item1.unitprice,
- total: item1.allprice,
- inventory: item1.instock, // 库存
- key: "",
- search_i: index1,
- medid: item1.drugid, // 药品id
- originname: item1.origin // 产地名称
- };
- obj.totalTableD.push(obj1);
- data1.getSelectType("中药药品用法", index1);
- });
- obj.totalTableD.push({
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- showSearch: false,
- search_i: 0,
- id: Number(item.zhongdetail[item.zhongdetail.length - 1].seqn) + 1
- });
- obj.totalTableD.filter((item3, index3) => {
- this.rationalMed = [];
- this.resetRationalMed();
- this.getRationalMed(item3.medid);
- return (item3.id = index3 + 1);
- });
- obj.tableData = obj.totalTableD.filter(item2 => {
- return Number(item2.id) % 2 != 0;
- });
- obj.tableData1 = obj.totalTableD.filter(item2 => {
- return Number(item2.id) % 2 == 0;
- });
- arr.push(obj);
- // if (
- // index == data.length - 1 &&
- // item.prescribed == 1 &&
- // isAutoCheck == 0
- // ) {
- // // arr.push(objAssaign)
- // setTimeout(() => {
- // data1.addRecipeTba(arr.length - 1);
- // }, 500);
- // }
- // && isAutoCheck == 1
- if (index == data.length - 1 && item.paystate == 1) {
- // arr.push(objAssaign)
- setTimeout(() => {
- data1.addRecipeTba(arr.length - 1);
- }, 500);
- }
- });
- data1.recipe_tabs_c = arr.length - 1;
- data1.recipe_tabs = arr;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
- arr[arr.length - 1].bottom_form.radio;
- data1.changePharmacy(
- arr[arr.length - 1].radio,
- arr[arr.length - 1].radio
- );
- data1.$forceUpdate();
- loading.close();
- }, 1000);
- },
- // 获取数据 赋值给 中成药处方
- assignRecipe2(data, loading) {
- setTimeout(() => {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[1];
- let isAutoCheck = data1.isAutoCheck;
- data1.bottom_form.zhutuo = data.command;
- data1.preId = data.preId ? data.preId : "";
- if (!!this.getEditPreNo()) {
- data1.bottom_form.radio = Number(data.isdelivery);
- data1.bottom_form.savename = data.consigneeName;
- data1.bottom_form.phone = data.consigneePhone;
- data1.bottom_form.address = data.address;
- data1.province = data.province;
- data1.city = data.city;
- data1.area = data.district;
- if (data.revierwstate == 1) {
- data1.prescribed = 0; // 是否已开方 0否 1是
- data1.paystate = 0;
- } else {
- data1.prescribed = data.prescribed; // 是否已开方 0否 1是
- data1.paystate = data.paystate;
- }
- } else {
- data1.prescribed = data.prescribed; // 是否已开方 0否 1是
- data1.paystate = data.paystate;
- }
- data1.bottom_form.zhutuo = data.command;
- if (data.province) {
- data1.getArea(data.province, 1);
- }
- if (data.city) {
- data1.getArea(data.city, 2);
- }
- data1.nowRecipeMoney = data.thisRecipePrice;
- data1.allMoney = data.allprice;
- let arr = [];
- data.chengDetail.forEach((item, index) => {
- let obj = {
- id: item.seqn,
- drugList: [],
- search_i: "",
- page: 1,
- loadMore: true,
- usageList: [],
- numList: [],
- timeList: [],
- name: item.drugName,
- spec: item.specification, // 规格
- dose: item.dose, // 剂量
- unit: item.unit, // 单位
- usage: item.usagestr, // 用法
- nums: item.frequency, //频次
- timesQuan: item.secondDose, // 次用量,
- timesUnit: item.zxdw,
- time: item.medicationtime, // 服药时间
- doseUnit: item.bzdw,
- from: item.origin, // 产地
- price: item.price,
- total: item.allprice,
- inventory: item.instock, // 库存
- key: "",
- medid: item.drugid
- };
- data1.getSelectType("中药制剂药品用法", index);
- data1.getSelectType("中药制剂服药时间", index);
- data1.getSelectType("中药制剂频次", index);
- arr.push(obj);
- });
- arr.push({
- key: "",
- page: 1,
- drugList: [],
- usageList: [],
- numList: [],
- timeList: [],
- loadMore: true
- });
- data1.tableData3 = arr;
- data1.tableData3.filter((item, index) => {
- return (item.id = index + 1);
- });
- this.$forceUpdate();
- loading.close();
- }, 1000);
- },
- // 获取数据 赋值给 适宜技术处方
- assignRecipe3(data, loading) {
- setTimeout(() => {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[2];
- let isAutoCheck = data1.isAutoCheck;
- data1.preId = data.preId ? data.preId : "";
- data1.bottom_form.doseNum1 = data.num;
- data1.bottom_form.doseType1 = data.technologyType;
- data1.bottom_form.zhutuo = data.command;
- data1.bottom_form.caozuo = data.useexplain;
- data1.allMoney = data.allprice;
- data1.nowMoney = data.thisRecipePrice;
- if (!!this.getEditPreNo()) {
- if (data.revierwstate == 1) {
- data1.prescribed = 0; // 是否已开方 0否 1是
- data1.paystate = 0;
- } else {
- data1.prescribed = data.prescribed; // 是否已开方 0否 1是
- data1.paystate = data.paystate;
- }
- } else {
- data1.prescribed = data.prescribed; // 是否已开方 0否 1是
- data1.paystate = data.paystate;
- }
- let arr = [];
- data.detail.forEach((item, index) => {
- let obj = {
- id: item.sqen,
- name: item.pointname,
- acuname: item.pointname,
- acuid: item.pointid
- };
- arr.push(obj);
- });
- arr.filter((item, index) => {
- return (item.id = index + 1);
- });
- data1.tableData4 = arr;
- loading.close();
- }, 1000);
- },
- // 协定方数据转方 赋值给中药处方
- agreeAssignToTCM(data, loading) {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[0];
- console.log(data1, "打印data1");
- data1.recipe_tabs[data1.recipe_tabs_c].disable = false;
- if (data.isupdate && data.isupdate === "1") {
- // 专家经验 不允许 修改
- data1.recipe_tabs[data1.recipe_tabs_c].disable = true;
- sessionStorage.setItem("isupdateExpre", "1");
- }
- if (data.type && data.type === "1") {
- // 协定方 不允许 修改
- data1.recipe_tabs[data1.recipe_tabs_c].disable = true;
- sessionStorage.setItem("isupdateExpre", "1");
- }
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.disable =
- data.type == "1";
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.doseType =
- data.curetype;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.nongjian =
- data.density;
- data1.recipe_tabs[
- data1.recipe_tabs_c
- ].bottom_form.specialDeploymentPrice = data.deploymentfree;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.num = data.frequency;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.time =
- data.medicationtime;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.agencyPrice =
- data.fryingfee;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.systemOfCreamPrice =
- data.markfree;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
- data.prescriptiontype;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.usege = data.usrage;
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
- // 赋值给表格
- data.preStiDetails.forEach((item, index) => {
- let obj1 = {
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- id: item.seqn,
- name: item.ypmc || item.drugname,
- spec: item.gg || item.specification, // 规格
- dose: item.dose, // 剂量
- unit: item.dw || item.unit, // 单位
- usage: item.usagestr, // 用法
- // usage: "",
- // price: item.lsjg,
- price: item.price ? item.price : 0,
- total: item.price ? item.price * item.dose : 0,
- inventory: item.kc, // 库存
- key: "",
- search_i: index,
- medid: item.ypmc ? item.pid : drugid, // 药品id
- originname: item.cdmc, // 产地名称
- showSearch: false
- };
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push(obj1);
- data1.getSelectType("中药药品用法", index);
- });
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push({
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- showSearch: false,
- search_i: 0,
- key: "",
- id: 1
- });
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.filter(
- (item3, index3) => {
- this.rationalMed = [];
- this.resetRationalMed();
- this.getRationalMed(item3.medid);
- return (item3.id = index3 + 1);
- }
- );
- data1.recipe_tabs[data1.recipe_tabs_c].tableData = data1.recipe_tabs[
- data1.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- return Number(item2.id) % 2 != 0;
- });
- data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = data1.recipe_tabs[
- data1.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- return Number(item2.id) % 2 == 0;
- });
- this.showAgree = false;
- this.showExpr = false;
- this.showPresc = false;
- this.showUnifyPresc = false;
- data1.getPharmacyID();
- data1.changePharmacy();
- },
- // 存为协定方后打开处方
- openRecipeAfterAgree() {
- let zhongPrescriptionVo = this.zhongPrescriptionVo;
- let chengPrescriptionVo = this.chengPrescriptionVo;
- let technologyPrescriptionVo = this.technologyPrescriptionVo;
- this._getRecipePriview(
- zhongPrescriptionVo,
- chengPrescriptionVo,
- technologyPrescriptionVo
- );
- },
- // 提交中药处方
- submitRecipe1() {
- let zhongPrescriptionVo = this.dealRecipe1();
- let chengPrescriptionVo = false;
- setTimeout(() => {
- chengPrescriptionVo = this.dealRecipe2();
- }, 100);
- let technologyPrescriptionVo = false;
- setTimeout(() => {
- technologyPrescriptionVo = this.dealRecipe3();
- }, 200);
- setTimeout(() => {
- if (technologyPrescriptionVo === false) {
- technologyPrescriptionVo = {};
- this.container_i = 2;
- return;
- }
- if (chengPrescriptionVo === false) {
- chengPrescriptionVo = {};
- this.container_i = 1;
- return;
- }
- if (zhongPrescriptionVo === false) {
- zhongPrescriptionVo = [];
- this.container_i = 0;
- return;
- }
- if (
- zhongPrescriptionVo.length == 0 &&
- Object.keys(zhongPrescriptionVo).length == 0 &&
- Object.keys(technologyPrescriptionVo).length == 0
- )
- return;
- this.$refs.TCM.saveDiagnosisData();
- this._getRecipePriview(
- zhongPrescriptionVo,
- chengPrescriptionVo,
- technologyPrescriptionVo
- );
- // if (this.isShowDj || this.isShowPs) {
- // this.showAddress = true;
- // } else {
- // this._getRecipePriview(
- // zhongPrescriptionVo,
- // chengPrescriptionVo,
- // technologyPrescriptionVo
- // );
- // }
- // if (zhongPrescriptionVo && zhongPrescriptionVo.length > 0) {
- // // 有中药处方 打开是否存为协定方界面
- // this.$confirm("是否存为协定方?", "温馨提示", {
- // confirmButtonText: "是",
- // cancelButtonText: "否",
- // type: "warning"
- // })
- // .then(() => {
- // this.zhongPrescriptionVo = zhongPrescriptionVo;
- // this.chengPrescriptionVo = chengPrescriptionVo;
- // this.technologyPrescriptionVo = technologyPrescriptionVo;
- // this.$refs.chineseM.saveToMine("reserve");
- // })
- // .catch(() => {
- // this._getRecipePriview(
- // zhongPrescriptionVo,
- // chengPrescriptionVo,
- // technologyPrescriptionVo
- // );
- // });
- // } else {
- // }
- }, 500);
- },
- // 修改推荐方剂轮播图下标
- changeRbanner(type) {
- if (type == "add") {
- if (this.r_current == 3) {
- this.r_current = 0;
- } else {
- this.r_current += 1;
- }
- this.$refs.r_banner.setActiveItem(this.r_current);
- } else if (type == "reduce") {
- if (this.r_current == 0) {
- this.r_current = 3;
- } else {
- this.r_current -= 1;
- }
- this.$refs.r_banner.setActiveItem(this.r_current);
- }
- },
- // 修改协定方 tab
- changeAgree(type) {
- this.agree_current = type;
- if (type == 0) {
- // this.activeNames = '0'
- this.collapseData[this.activeNames].page = 1;
- this.collapseData[this.activeNames].loadMore = true;
- this.collapseData[this.activeNames].list = [];
- this.getAgreeRecipe(this.collapseData[this.activeNames].loadMore);
- } else if (type == 1) {
- this.getPrescriptionsList();
- } else if (type == 2) {
- this.getDoctorCaseL();
- }
- },
- // 查看药品信息
- findDrug(scope) {
- console.log(scope, "药品信息");
- // this.showDrug = true
- if (scope.row.color == "red") {
- this.getMedDetail(scope.row.medid);
- } else {
- this.getDrugDetail(scope.row.medid);
- }
- },
- // 查看穴位信息
- find(scope) {
- this.getAcupointD(scope.row.acuid);
- },
- // 顶部tab 改变
- changeContainer(type) {
- this.container_i = type;
- if (type == 1) return;
- // if (this.contentTabs[type].color == 'red') {
- this.inferRecipe(3);
- // }
- // if (type == 2) {
- // if (!this.isTuiDaoSuit) {
- // this.isTuiDaoSuit = true
- // this.inferRecipe()
- // }
- // }
- // if (type == 0) {
- // if (!this.isTuiDaoZy) {
- // this.isTuiDaoZy = true
- // this.inferRecipe()
- // }
- // }
- },
- checked(item1) {
- this.contentTabs.forEach(item => {
- if (item.name == item1.name) {
- item.check = !item.check;
- }
- });
- let type = this.container_i;
- setTimeout(() => {
- if (type == 0) {
- let arr = this.$refs.chineseM.recipe_tabs;
- let allmoney = 0;
- arr.forEach(item => {
- allmoney += item.bottom_form.allMoney;
- });
- this.chineseM.allMoney = allmoney;
- } else if (type == 1) {
- console.log(this.$refs.medicineC.allMoney);
- this.medicineC.allMoney = this.$refs.medicineC.allMoney;
- } else if (type == 2) {
- this.suitScience.allMoney = this.$refs.suitScience.allMoney;
- }
- }, 500);
- },
- // 名家验案转方
- turnRecipe(item) {
- this.setDrugsInfo(item.verpreitemlist);
- this.changeAndJoin();
- this.addRecipeFrom("5");
- },
- // 就诊记录转方
- turnRecipe1(item) {
- // 病历转方
- this.addRecipeFrom("6");
- this.getRecipeDataByid(item.pid);
- this.showRecord = false;
- this.showAgree = false;
- },
- // 协定方转方
- turnRecipe2() {
- this.addRecipeFrom("2");
- this.changeBasisPre(this.agreeInfo.pid);
- // this.showAgree = false
- },
- // 专家经验合方
- joinRecipe3(info) {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[0];
- let data = info;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.disable =
- data.type == "1";
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.doseType =
- data.curetype;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.nongjian =
- data.density;
- data1.recipe_tabs[
- data1.recipe_tabs_c
- ].bottom_form.specialDeploymentPrice = data.deploymentfree;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.num = data.frequency;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.time =
- data.medicationtime;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.agencyPrice =
- data.fryingfee;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.systemOfCreamPrice =
- data.markfree;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
- data.prescriptiontype;
- data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.usege = data.usrage;
- if (data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.length == 1) {
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
- } else {
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.pop();
- }
- if (info.isupdate == "1") {
- this.turnRecipe3(info);
- return;
- }
- // 赋值给表格
- data.preStiDetails.forEach((item, index) => {
- let obj1 = {
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- id: item.seqn,
- name: item.ypmc || item.drugname,
- spec: item.gg || item.specification, // 规格
- dose: item.dose, // 剂量
- unit: item.dw || item.unit, // 单位
- // usage: item.usagestr, // 用法
- usage: "",
- // usage: item.yf,
- // price: item.lsjg,
- price: item.price ? item.price : 0,
- total: item.price ? item.price * item.dose : 0,
- inventory: item.kc, // 库存
- key: "",
- search_i: index,
- medid: item.ypmc ? item.pid : drugid, // 药品id
- originname: item.cdmc, // 产地名称
- showSearch: false
- };
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push(obj1);
- data1.getSelectType("中药药品用法", index);
- });
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push({
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- showSearch: false,
- search_i: 0,
- key: "",
- id: 1
- });
- data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.filter(
- (item3, index3) => {
- this.rationalMed = [];
- this.resetRationalMed();
- this.getRationalMed(item3.medid);
- return (item3.id = index3 + 1);
- }
- );
- data1.recipe_tabs[data1.recipe_tabs_c].tableData = data1.recipe_tabs[
- data1.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- return Number(item2.id) % 2 != 0;
- });
- data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = data1.recipe_tabs[
- data1.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- return Number(item2.id) % 2 == 0;
- });
- this.showAgree = false;
- this.showExpr = false;
- data1.getPharmacyID();
- },
- //专家经验转方
- turnRecipe3(info) {
- this.changeExpre(info);
- },
- // 适宜技术处方 专方 和方
- suitChnageOrJoin(type = "") {
- // type = '' 专访 type == 1 和方
- if (this.container_i == 1) return;
- const loading = this.$loading({
- lock: true,
- text: "正在处理数据,请稍后",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child = children[2];
- let drugs = this.getDrugInfo;
- if (type == "") {
- // 转方
- child.tableData4 = [];
- drugs.forEach((item, index) => {
- let obj = {
- id: index + 1,
- name: item.acuname,
- acuname: item.acuname,
- acuid: item.acuid
- };
- // 锚点
- child.bottom_form.caozuo +=
- obj.acuname + ":" + item.acuoperation + " ";
- child.tableData4.push(obj);
- });
- child.tableData4.push({
- id: "",
- name: "",
- acuname: "",
- acuid: ""
- });
- child.tableData4.filter((item, index) => {
- return (item.id = index + 1);
- });
- } else if (type == 1) {
- child.tableData4.pop();
- drugs.forEach((item, index) => {
- let obj = {
- id: index + 1,
- name: item.acuname,
- acuname: item.acuname,
- acuid: item.acuid
- };
- child.tableData4.push(obj);
- });
- child.tableData4.push({
- id: "",
- name: "",
- acuname: "",
- acuid: ""
- });
- child.tableData4.filter((item, index) => {
- return (item.id = index + 1);
- });
- }
- this.showDialog = false;
- loading.close();
- },
- // 换方 按钮 直接点击
- inferChange(item, type = "", type1 = "") {
- // type == 1 type1 == 1 不掉详情接口 直接转方 和方
- this.addRecipeFrom("4", 2);
- if (type == 1 && type1 == 1) {
- this.setDrugsInfo(item.items);
- this.suitChnageOrJoin();
- return;
- }
- console.log(item, "item");
- this.getPreDetal(item.preid || item.pried || item.acupreid);
- },
- // 和方按钮直接点击
- inferChange1(item, type = "", type1 = "") {
- let isupdateExpre = sessionStorage.getItem("isupdateExpre");
- if (isupdateExpre == "1") {
- this.$message("请先清空当前处方");
- return;
- }
- this.addRecipeFrom("4", 2);
- if (type == 1 && type1 == 1) {
- this.setDrugsInfo(item.items);
- this.suitChnageOrJoin(1);
- return;
- }
- this.getPreDetal(item.preid || item.pried || item.acupreid, 2);
- },
- //方剂合方
- joinRecipe() {
- let isupdateExpre = sessionStorage.getItem("isupdateExpre");
- if (isupdateExpre == "1") {
- this.$message("请先清空当前处方");
- return;
- }
- if (!this.preInfo.prename) {
- this.addRecipeFrom("4", 2);
- this.suitChnageOrJoin(1);
- return;
- }
- this.addRecipeFrom("4");
- this.setDrugsInfo(this.preInfo.items);
- this.changeAndJoin(2);
- },
- // 方剂换方
- changeRecipe(e) {
- if (e == 1) {
- this.showDialog = false;
- // this.tjRecipeId = ''
- return;
- }
- if (!this.preInfo.prename) {
- this.addRecipeFrom("4", 2);
- // 适宜技术处方
- this.suitChnageOrJoin();
- return;
- }
- this.addRecipeFrom("4");
- this.setDrugsInfo(this.preInfo.items);
- this.changeAndJoin(1);
- },
- // 药方是否支付
- async _recipeIsPay(id, type, index) {
- let res = await recipeIsPay({
- preId: id,
- visitId: JSON.parse(sessionStorage.getItem("patiensInfo")).pid
- });
- if (res.ResultCode == 0) {
- // 跟据id 回显
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let data1 = children[0];
- let data2 = children[1];
- let data3 = children[2];
- if (type == 1) {
- // 根据处方id 回显
- setTimeout(() => {
- if (data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.length > 1) {
- data1.recipe_tabs[data1.recipe_tabs_c].isPay = res.Data;
- }
- if (data2.tableData3.length > 1) {
- data2.isPay = res.Data;
- }
- if (data3.tableData4.length > 1) {
- data3.isPay = res.Data;
- }
- }, 1000);
- }
- if (type == 2) {
- setTimeout(() => {
- // 处方回显
- if (index) {
- data1.recipe_tabs[index].isPay = res.Data;
- }
- if (data2.tableData3.length > 1) {
- data2.isPay = res.Data;
- }
- if (data3.tableData4.length > 1) {
- data3.isPay = res.Data;
- }
- }, 1000);
- }
- }
- },
- // 获取穴位信息
- async getAcupointD(id) {
- let res = await getAcupointD({
- acuid: id
- });
- if (res.code == 0) {
- this.xwinfo = res.data;
- this.showXuewei = true;
- }
- },
- // 获取病人 左侧信息
- async getPatiensBasisM() {
- let res = await getPatiensBasisM({
- patientId: this.getPatiensInfo.pid
- // patientId: '4e9db43d-25aa-4683-9564-5120deac2c56'
- });
- if (res.ResultCode == 0) {
- // res.Data.recordLength = res.Data.patientRecord.length;
- // this.agree_key = res.Data.maindiagnosis ?
- // res.Data.maindiagnosis.namemedicine ?
- // res.Data.maindiagnosis.namemedicine :
- // "" :
- // "";
- this.agree_key1 = res.Data.maindiagnosis
- ? res.Data.maindiagnosis.namemedicine
- ? res.Data.maindiagnosis.namemedicine
- : ""
- : "";
- res.Data.secondarydiagnosis = res.Data.secondarydiagnosis
- ? res.Data.secondarydiagnosis
- : [];
- this.patiensMsg = res.Data;
- this.patiensMsg.outpatientElectronicmedicalrecord.image1 = formatPicture(this.patiensMsg.outpatientElectronicmedicalrecord.image1);
- // if (!this.patiensMsg.maindiagnosis.disid) {
- // this.$message.warning("请先提交一条诊断信息");
- // this.$router.replace({
- // path: "/index/diagnosis"
- // });
- // return;
- // }
- // if (this.patiensMsg.maindiagnosis.disid) {
- // this.inferRecipe();
- // }
- }
- },
- async openTongueAndFaceAnalysis() {
- if (!this.tongueAndFaceAnalysis) await this.getPatientBasisTongueAndFaceAnalysis()
- if (this.tongueAndFaceAnalysis) this.showTongueAnalysis = true;
- },
- // 获取病人 舌面象数据
- async getPatientBasisTongueAndFaceAnalysis() {
- this.tongueAndFaceLoading = true;
- try {
- const get = getTongueAndFaceAnalysisRecords.bind(null, this.getPatiensInfo ? this.getPatiensInfo.pid : "")
- let result = await get(1, 3);
- this.tongueAndFaceAnalysis = result.total > 0 ? {...result, get} : null;
- } catch (e) {
- this.$message.error(e.ResultInfo);
- }
- this.tongueAndFaceLoading = false;
- },
- // 获取处方预览数据
- async _getRecipePriview(zhongyao, zhongchengyao, technology) {
- const loading = this.$loading({
- lock: true,
- text: "正在提交",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- let params = {
- recordid: this.getPatiensInfo.pid,
- technology: technology,
- zhongchengyao: zhongchengyao,
- zhongyao: zhongyao
- };
- let res = await getRecipePriview(params).catch(err => {
- loading.close();
- });
- if (res.ResultCode == 0) {
- loading.close();
- res.Data.tcmPrescriptionFormVos.forEach((item, index) => {
- // if(item.)
- item.isdelivery = zhongyao[index].isdelivery;
- });
- this.priviewData = res.Data;
- sessionStorage.setItem(
- "priviewRawData",
- JSON.stringify({
- zhongyao,
- zhongchengyao,
- technology
- })
- );
- this.showPriview = true;
- }
- },
- // 获取处方回显数据
- async getRecipeShowData() {
- const loading = this.$loading({
- lock: true,
- text: "正在加载数据",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- let res = await getRecipeShowData(this.getPatiensInfo.pid).catch(err => {
- loading.close();
- });
- if (res.ResultCode == 0) {
- if (!res.Data.flag) {
- loading.close();
- if (this.getPatiensInfo.pid) {
- await this.getPatiensBasisM();
- }
- return;
- }
- this.contentTabs[0].check = res.Data.zhongyao.length > 0;
- this.contentTabs[1].check = res.Data.zhongchengyao.chengDetail !== null;
- this.contentTabs[2].check = res.Data.technology.detail !== null;
- this.container_i = this.contentTabs[0].check
- ? 0
- : this.contentTabs[1].check
- ? 1
- : this.contentTabs[2].check
- ? 2
- : 0;
- this.chineseM.allMoney = res.Data.zhonyaoPrice;
- this.medicineC.allMoney = res.Data.zhonchengPrice;
- this.suitScience.allMoney = res.Data.technologyPrice;
- if (this.contentTabs[0].check) {
- this.assignRecipe1(res.Data.zhongyao, loading);
- res.Data.zhongyao.forEach((item, index) => {
- this._recipeIsPay(item.preId, 2, index);
- });
- this.container_i = 0;
- }
- if (this.contentTabs[1].check) {
- this.assignRecipe2(res.Data.zhongchengyao, loading);
- this._recipeIsPay(res.Data.zhongchengyao.preId, 2);
- this.container_i = 1;
- }
- if (this.contentTabs[2].check) {
- this.assignRecipe3(res.Data.technology, loading);
- this._recipeIsPay(res.Data.technology.preId, 2);
- this.container_i = 2;
- }
- if (this.getPatiensInfo.pid) {
- this.getPatiensBasisM();
- }
- }
- },
- // 跟据id 获取处方回显数据
- async getRecipeDataByid(id) {
- let params = {
- pid: id
- };
- const loading = this.$loading({
- lock: true,
- text: "正在处理转方数据",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- let res = await getRecipeDataByid(params).catch(err => {
- loading.close();
- });
- if (res.ResultCode == 0) {
- if (res.Data.type == 0) {
- res.Data.zhongdetail = res.Data.detail;
- let arr = [];
- arr.push(res.Data);
- this.container_i = 0;
- this.contentTabs[0].check = true;
- this.contentTabs[1].check = false;
- this.contentTabs[2].check = false;
- this.assignRecipe1(arr, loading);
- } else if (res.Data.type == 1) {
- res.Data.chengDetail = res.Data.detail;
- this.container_i = 1;
- this.contentTabs[0].check = false;
- this.contentTabs[1].check = true;
- this.contentTabs[2].check = false;
- this.assignRecipe2(res.Data, loading);
- } else if (res.Data.type == 2) {
- this.container_i = 2;
- this.contentTabs[0].check = false;
- this.contentTabs[1].check = false;
- this.contentTabs[2].check = true;
- this.assignRecipe3(res.Data, loading);
- }
- this._recipeIsPay(id, 1);
- }
- },
- //获取右侧协定方列表
- async getAgreeRecipe(load = true) {
- if (!load) return;
- let params = {
- type: this.activeNames,
- pageId: this.collapseData[this.activeNames].page,
- pageSize: 10
- };
- let res = await getAgreeRecipe(params);
- if (res.ResultCode == 0) {
- if (
- this.collapseData[this.activeNames].list.length <=
- res.Data.TotalRecordCount
- ) {
- this.collapseData[this.activeNames].list = [
- ...this.collapseData[this.activeNames].list,
- ...res.Data.Items
- ];
- if (
- this.collapseData[this.activeNames].list.length >=
- res.Data.TotalRecordCount
- ) {
- this.collapseData[this.activeNames].loadMore = false;
- } else {
- this.collapseData[this.activeNames].page += 1;
- }
- } else {
- this.collapseData[this.activeNames].loadMore = false;
- }
- }
- },
- // 获取方剂列表
- async getPrescriptionsList(load = true) {
- if (!load) return;
- let params = {
- pageid: this.rPrescription.page,
- pagesize: 5,
- searchtype: "",
- keyword: this.agree_key
- };
- let res = await getPrescriptionsList(params);
- if (res.code == 0) {
- if (this.rPrescription.page <= res.data.TotalPageCount) {
- this.rPrescription.list = [
- ...this.rPrescription.list,
- ...res.data.pres
- ];
- if (this.rPrescription.page == res.data.TotalPageCount) {
- this.rPrescription.loadMore = false;
- } else {
- this.rPrescription.page += 1;
- }
- } else {
- this.rPrescription.loadMore = false;
- }
- }
- },
- // 获取参考医案
- async getDoctorCaseL(load = true) {
- if (!load) return;
- let params = {
- pageid: this.rDoctorCase.page,
- pagesize: 5,
- searchtype: "",
- keyword: this.agree_key1
- };
- let res = await getDoctorCaseL(params);
- if (res.code == 0) {
- if (this.rDoctorCase.page <= res.data.TotalPageCount) {
- res.data.verifys.filter(item => {
- return (item.content = item.disname + " " + item.attendingexpert);
- });
- this.rDoctorCase.list = [
- ...this.rDoctorCase.list,
- ...res.data.verifys
- ];
- if (this.rDoctorCase.page == res.data.TotalPageCount) {
- this.rDoctorCase.loadMore = false;
- } else {
- this.rDoctorCase.page += 1;
- }
- } else {
- this.rPrescriprDoctorCasetion.loadMore = false;
- }
- }
- },
- // 获取右侧合理用药信息展示
- async getRationalMed(id) {
- let ids = [];
- // this.rationalMed = []
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child = children[0];
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.forEach(item => {
- if (item.name) {
- ids.push(item.medid);
- }
- });
- let idsIndex = 0;
- ids.forEach((item, index) => {
- if (item == id) {
- idsIndex = index;
- }
- });
- ids.splice(idsIndex, 1);
- // this.rationalMed = []
- let res = await getRationalMed({
- matID: id,
- orgId: this.getuserinfo.organizationid,
- matIds: ids
- });
- if (res.code == 0 && res.message) {
- res.data.reqID = id;
- this.rationalMed.push(res.data);
- // 去重
- const removeRepeat = (arr, key) => {
- let obj = {};
- arr = arr.reduce((pre, next) => {
- obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
- return pre;
- }, []);
- return arr;
- };
- this.resetRationalMed();
- this.rationalMed = removeRepeat(this.rationalMed, "reqID");
- }
- },
- resetRationalMed() {
- const removeRepeat = (arr, key) => {
- let obj = {};
- arr = arr.reduce((pre, next) => {
- obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
- return pre;
- }, []);
- return arr;
- };
- this.rationalMed1 = [];
- this.rationalMed2 = [];
- this.rationalMed3 = [];
- this.rationalMed4 = [];
- this.rationalMed5 = [];
- this.rationalMed6 = [];
- this.rationalMed7 = [];
- this.rationalMed8 = [];
- this.rationalMed9 = [];
- this.rationalMed10 = [];
- this.rationalMed = removeRepeat(this.rationalMed, "reqID");
- this.rationalMed.forEach(item => {
- item.showDose = item.showDose ? true : false;
- if (item.matdosage) {
- // 超剂量药品:
- this.rationalMed1.push(item);
- }
- if (item.matsjj) {
- // 慎忌禁用药:
- this.rationalMed2.push(item);
- }
- if (item.matyfsjj) {
- // 孕妇慎忌禁:
- this.rationalMed3.push(item);
- }
- if (item.matysjj) {
- // 服药饮食禁忌:
- this.rationalMed4.push(item);
- }
- if (item.matdxsm) {
- /// 药物毒性说明:
- this.rationalMed5.push(item);
- }
- if (item.matbzjj) {
- // 病证用药禁忌:
- this.rationalMed6.push(item);
- }
- if (item.matsbf) {
- // 18反
- this.rationalMed7.push(item);
- }
- if (item.matsjw) {
- // 十九畏:
- this.rationalMed8.push(item);
- }
- if (item.matby) {
- // 用药不宜:
- this.rationalMed9.push(item);
- }
- if (item.matmaxdosage && item.matmindosage) {
- this.rationalMed10.push(item);
- }
- });
- this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
- this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
- this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
- this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
- this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
- this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
- this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
- this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
- this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
- this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
- },
- // 获取合理用药信息 平台
- async getRationalMedForPlat(id) {
- let ids = [];
- this.rationalMed = [];
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child = children[0];
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.forEach(item => {
- if (item.name) {
- ids.push(item.medid);
- }
- });
- let idsIndex = 0;
- ids.forEach((item, index) => {
- if (item == id) {
- idsIndex = index;
- }
- });
- ids.splice(idsIndex, 1);
- let res = await getRationalMedForPlat({
- matID: id,
- // orgId: this.getuserinfo.organizationid
- matIds: ids
- });
- if (res.code == 0 && res.message) {
- res.data.reqID = id;
- this.rationalMed.push(res.data);
- // 去重
- const removeRepeat = (arr, key) => {
- let obj = {};
- arr = arr.reduce((pre, next) => {
- obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
- return pre;
- }, []);
- return arr;
- };
- this.rationalMed = removeRepeat(this.rationalMed, "reqID");
- this.rationalMed.forEach(item => {
- item.showDose = item.showDose ? true : false;
- if (item.matdosage) {
- // 超剂量药品:
- this.rationalMed1.push(item);
- }
- if (item.matsjj) {
- // 慎忌禁用药:
- this.rationalMed2.push(item);
- }
- if (item.matyfsjj) {
- // 孕妇慎忌禁:
- this.rationalMed3.push(item);
- }
- if (item.matysjj) {
- // 服药饮食禁忌:
- this.rationalMed4.push(item);
- }
- if (item.matdxsm) {
- /// 药物毒性说明:
- this.rationalMed5.push(item);
- }
- if (item.matbzjj) {
- // 病证用药禁忌:
- this.rationalMed6.push(item);
- }
- if (item.matsbf) {
- // 18反
- this.rationalMed7.push(item);
- }
- if (item.matsjw) {
- // 十九畏:
- this.rationalMed8.push(item);
- }
- if (item.matby) {
- // 用药不宜:
- this.rationalMed9.push(item);
- }
- if (item.matmaxdosage && item.matmindosage) {
- this.rationalMed10.push(item);
- }
- });
- // 去重
- this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
- this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
- this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
- this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
- this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
- this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
- this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
- this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
- this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
- this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
- }
- },
- // 推导处方
- async inferRecipe(type = 1, businesstype) {
- if (!this.patiensMsg.maindiagnosis.disid) {
- return;
- }
- if (this.container_i == 1) return;
- if (type != 4) {
- // if (!this.patiensMsg.maindiagnosis.disid) {
- // this.$message.warning('请先提交一条诊断信息');
- // this.$router.replace({
- // path: '/index/diagnosis'
- // })
- // return;
- // }
- }
- if (type != 4) {
- businesstype =
- this.container_i == 0 ? "1" : this.container_i == 2 ? "3" : "1";
- }
- let params = {
- businesstype: businesstype,
- disid: this.patiensMsg.maindiagnosis.disid,
- symid: this.patiensMsg.maindiagnosis.symptomid,
- therapy: this.patiensMsg.maindiagnosis.treatment
- };
- const loading = this.$loading({
- lock: true,
- text: "正在获取推荐方剂数据",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- let res = await inferRecipe(params).catch(err => {
- loading.close();
- });
- if (res.code == 0) {
- loading.close();
- let arr = [];
- res.data.expList.forEach(item => {
- item.showType = 1; // 专家经验
- item.book = item.book ? item.book : "(暂无)";
- });
- res.data.schemes[0].pres.forEach(item => {
- item.showType = 0; // 之前的推导出
- item.book = item.book ? item.book : "(暂无)";
- });
- // this.inferRecipeId = res.data.schemes[0].preid
- let arr2 = res.data.expList.concat(res.data.schemes[0].pres);
- if (type == 4) {
- this.contentTabs[businesstype - 1].color =
- arr2.length > 0 ? "red" : "";
- return;
- }
- if (arr2.length > 0) {
- this.tjRecipeId = arr2[0].preid || arr2[0].pid || arr2[0].acupreid;
- } else {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child = children[0];
- if (
- !child.recipe_tabs[child.recipe_tabs_c].isPay ||
- child.recipe_tabs[child.recipe_tabs_c].paystate == 0
- ) {
- // child.clearRecipe();
- }
- }
- this.rRecomendR = arr2;
- if (this.$route.query.type != "tuidao" && type == 1) return;
- if (type == 3 && this.container_i == 0 && this.isTuiDaoZy) return;
- if (type == 3 && this.container_i == 2 && this.isTuiDaoSuit) return;
- if (this.rRecomendR.length == 0) return;
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child = children[0];
- let child2 = children[2];
- if (
- child.recipe_tabs[child.recipe_tabs_c].isPay ||
- child.recipe_tabs[child.recipe_tabs_c].paystate == 1
- ) {
- // 已付费
- child.addRecipeTba();
- }
- if (child2.isPay || child2.paystate == 1) {
- // 已付费
- this.$message.error("当前为已付费处方,暂不支持推导");
- return;
- }
- setTimeout(() => {
- if (
- // this.$route.query.infer &&
- // this.$route.query.infer == "true" &&
- // && child.recipe_tabs[child.recipe_tabs_c].totalTableD.length == 1
- this.container_i == 0
- ) {
- // console.log(arr, 'res.data');
- this.addRecipeFrom("4");
- if (arr2[0].showType == 1) {
- // 专家经验
- this.turnRecipe3(arr2[0]);
- } else {
- // 推导处方
- this.getPreDetal(arr2[0].preid);
- }
- if (type == 3) {
- this.isTuiDaoZy = true;
- }
- } else if (this.container_i == 2) {
- // && child2.tableData4.length == 1
- if (arr2.length > 0) {
- this.setDrugsInfo(arr2[0].items);
- }
- this.addRecipeFrom("4", 2);
- this.suitChnageOrJoin();
- if (type == 3) {
- this.isTuiDaoSuit = true;
- }
- }
- }, 500);
- }
- },
- // 新增处方来源
- async addRecipeFrom(type, isSuit = "") {
- if (type != 3) {
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child = children[0];
- let child2 = children[2];
- // debugger;
- child.recipe_tabs[child.recipe_tabs_c].isMyMade = false;
- if (isSuit == 2) {
- child2.isMyMade = false;
- }
- }
- let res = await addRecipeFrom({
- type: type
- });
- },
- // 获取参考医案详情
- async getDCaseDetail(id) {
- let res = await getDCaseDetail({
- verId: id
- });
- if (res.code == 0) {
- this.showTestCase = true;
- res.data.dialist.forEach(item => {
- item.checktime = item.checktime.split(" ");
- item.diatimes = numberToUpperCase(item.diatimes - 1);
- });
- this.testCaseInfo = res.data;
- }
- },
- // 协定方转方 判断
- async changeBasisPre(id) {
- let params = {
- basisPreId: id
- };
- let res = await changeBasisPre(params);
- if (res.ResultCode == 0) {
- this.agreeAssignToTCM(this.agreeInfo);
- }
- },
- // 专家经验转方判断
- async changeExpre(info) {
- let params = {
- basisPreId: info.pid
- };
- let res = await changeExpre(params);
- if (res.ResultCode == 0) {
- // info.preStiDetails = info.prescriptionDetailVos
- this.agreeAssignToTCM(info);
- }
- },
- // 名家验案和 方剂转方/合方
- async changeAndJoin(type = 1) {
- // type == 1 转方 type ==2 合方
- let children = this.$children.filter(item => {
- return (
- item.name == "中药处方" ||
- item.name == "中药制剂" ||
- item.name == "适宜技术处方"
- );
- });
- let child = children[0];
- child.recipe_tabs[child.recipe_tabs_c].disable = false;
- let drugs = this.getDrugInfo;
- // let type1 = 0
- let type1 = child.recipe_tabs[child.recipe_tabs_c].radio.split("@")[1];
- let ids = [];
- drugs.forEach(item => {
- let idDose = item.matid + "&" + item.dose + "&" + (item.useage || "");
- ids.push(idDose);
- });
- if (this.container_i == 1) return;
- const loading = this.$loading({
- lock: true,
- text: "正在处理药品数据,请稍等",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- let res = await changeAndJoin({
- pharmacyid: child.recipe_tabs[child.recipe_tabs_c].pharmacyID,
- type: type1, // child.recipe_tabs[child.recipe_tabs_c].radio,
- drugIds: ids
- }).catch(err => {
- loading.close();
- });
- if (this.container_i == 0) {
- // 中药处方
- if (res.ResultCode == 0) {
- const getUsage = (function (list = [], value = '') {
- if (!Array.isArray(list) || list.length === 0) return void 0;
- const option = value && list.find(item => item.value === value || item.key == value);
- return option ? option.key : list[0].key;
- }).bind(null, child.usageList);
- let noDrugs = []; // 查找不到的药品
- let hasDrugs = []; // 查找的到的药品
- res.Data.forEach((item, index) => {
- drugs.forEach((item1, index1) => {
- if (item == item1.matid) {
- // debugger
- item1.color = "red";
- let obj = {
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- seqn: item1.seqn,
- ypmc: item1.matname,
- gg: "",
- dw: item1.unit,
- lsjg: item1.price ? item1.price : 0,
- price: item1.price ? item1.price : 0,
- kc: 0,
- cdmc: "无",
- pid: item1.matid,
- color: "red",
- dose: item1.dose,
- usage: item1.useage || item1.usagestr, // child.usegeList[0].key,
- showSearch: false,
- matid: item1.matid,
- key: "",
- search_i: index
- };
- /* 修正 */ obj.usage = obj.useage = getUsage(obj.usage);
- noDrugs.push(obj);
- // noDrugs.push(item1.matname)
- }
- if (item instanceof Object && item.oldYpid == item1.matid) {
- hasDrugs.push(item);
- }
- });
- });
- hasDrugs = hasDrugs.concat(noDrugs);
- if (hasDrugs.length > 0 && type == 1) {
- child.recipe_tabs[child.recipe_tabs_c].totalTableD = [];
- // console.log(hasDrugs, 'has');
- // 赋值给表格
- hasDrugs.forEach((item, index) => {
- let obj1 = {
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- id: item.seqn,
- name: item.ypmc,
- spec: item.gg, // 规格
- dose: item.dose, // 剂量
- unit: item.dw, // 单位
- // usage: item.usagestr, // 用法
- usage: item.useage || item.usagestr, // child.usegeList[0].key,
- // price: item.lsjg,
- price: item.price ? item.price : 0,
- total: item.price * item.dose,
- inventory: item.kc, // 库存
- key: "",
- search_i: index,
- medid: item.pid, // 药品id
- originname: item.cdmc, // 产地名称
- showSearch: false,
- color: item.color ? item.color : "#000"
- };
- /* 修正 */ obj1.usage = obj1.useage = getUsage(obj1.usage);
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.push(obj1);
- child.getSelectType("中药药品用法", index);
- });
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.push({
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- showSearch: false,
- search_i: 0,
- id: 1,
- key: ""
- });
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.filter(
- (item3, index3) => {
- if (item3.medid) {
- this.rationalMed = [];
- this.resetRationalMed();
- // if (item3.color != '#000') {
- // this.getRationalMedForPlat(item3.medid)
- // } else {
- // this.getRationalMed(item3.medid)
- // }
- if (item3.medid.indexOf("-") != -1) {
- this.getRationalMed(item3.medid);
- } else {
- this.getRationalMedForPlat(item3.medid);
- }
- }
- return (item3.id = index3 + 1);
- }
- );
- child.recipe_tabs[
- child.recipe_tabs_c
- ].tableData = child.recipe_tabs[
- child.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- return Number(item2.id) % 2 != 0;
- });
- child.recipe_tabs[
- child.recipe_tabs_c
- ].tableData1 = child.recipe_tabs[
- child.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- return Number(item2.id) % 2 == 0;
- });
- } else if (hasDrugs.length > 0 && type == 2) {
- child.recipe_tabs[
- child.recipe_tabs_c
- ].totalTableD = child.recipe_tabs[
- child.recipe_tabs_c
- ].totalTableD.filter(item => {
- return item.name;
- });
- // console.log(hasDrugs, "has");
- // 赋值给表格
- hasDrugs.forEach((item, index) => {
- let obj1 = {
- color: item.color ? item.color : "#000",
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- id: item.seqn,
- name: item.ypmc,
- spec: item.gg, // 规格
- dose: item.dose, // 剂量
- unit: item.dw, // 单位
- // usage: item.usagestr, // 用法
- usage: item.useage || item.usagestr, // child.usegeList[0].key,
- // price: item.lsjg,
- price: item.price ? item.price : 0,
- total: item.price * item.dose,
- inventory: item.kc, // 库存
- key: "",
- search_i: index,
- medid: item.pid, // 药品id
- originname: item.cdmc, // 产地名称
- showSearch: false
- };
- /* 修正 */ obj1.usage = obj1.useage = getUsage(obj1.usage);
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.push(obj1);
- child.getSelectType("中药药品用法", index);
- });
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.push({
- drugList: [],
- page: 1,
- loadMore: true,
- usageList: [],
- showSearch: false,
- search_i: 0,
- id: 1,
- key: ""
- });
- child.recipe_tabs[
- child.recipe_tabs_c
- ].totalTableD = this.removeRepeat(
- child.recipe_tabs[child.recipe_tabs_c].totalTableD,
- "medid"
- );
- child.recipe_tabs[child.recipe_tabs_c].totalTableD.filter(
- (item3, index3) => {
- return (item3.id = index3 + 1);
- }
- );
- child.recipe_tabs[
- child.recipe_tabs_c
- ].tableData = child.recipe_tabs[
- child.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- if (item2.medid) {
- // if (item2.color != '#000') {
- // this.getRationalMedForPlat(item2.medid)
- // } else {
- // this.getRationalMed(item2.medid)
- // }
- if (item2.medid.indexOf("-") != -1) {
- this.getRationalMed(item2.medid);
- } else {
- this.getRationalMedForPlat(item2.medid);
- }
- }
- return Number(item2.id) % 2 != 0;
- });
- child.recipe_tabs[
- child.recipe_tabs_c
- ].tableData1 = child.recipe_tabs[
- child.recipe_tabs_c
- ].totalTableD.filter(item2 => {
- return Number(item2.id) % 2 == 0;
- });
- }
- this.showTestCase = false;
- this.showDialog = false;
- this.showPresc = false;
- this.showUnifyPresc = false;
- loading.close();
- }
- } else if (this.container_i == 2) {
- // 适宜技术处方
- }
- },
- // 跟据就诊记录id 获取就诊记录详细信息
- async getSeeDByID(id) {
- let params = {
- recId: id
- };
- const loading = this.$loading({
- lock: true,
- text: "正在查找数据",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)"
- });
- let res = await getSeeDByID(params).catch(err => {
- loading.close();
- });
- if (res.ResultCode == 0) {
- loading.close();
- this.recordInfo = res.Data;
- this.showRecord = true;
- }
- },
- // 获取中药详情
- async getMedDetail(id) {
- let res = await getMedDetail({
- matid: id
- });
- if (res.code == 0) {
- res.data.matphoto = res.data.matphoto.split(",");
- // res.data.matphoto = res.data.matphoto.split(',')
- res.data.xiangsi = res.data.relativedata.filter(item => {
- return item.relativetype == 1;
- });
- res.data.changyong = res.data.relativedata.filter(item => {
- return item.relativetype == 2;
- });
- this.drugInfo = res.data;
- this.showDrug = true;
- }
- },
- // 获取药品详细信息并展示
- async getDrugDetail(id) {
- let res = await getDrugDetail({
- stiDrugId: id
- });
- if (res.ResultCode == 0) {
- res.Data.matphoto = res.Data.matphoto.split(",");
- // res.data.matphoto = res.data.matphoto.split(',')
- res.Data.xiangsi = res.Data.relativedata.filter(item => {
- return item.relativetype == 1;
- });
- res.Data.changyong = res.Data.relativedata.filter(item => {
- return item.relativetype == 2;
- });
- this.drugInfo = res.Data;
- this.showDrug = true;
- }
- },
- // 获取方剂详情
- async getPreDetal(id, type = "") {
- if (id instanceof Object) {
- // 适宜技术处方
- this.preInfo = id;
- this.setDrugsInfo(id.items);
- this.showDialog = true;
- this.tjRecipeId = id.acupreid;
- return;
- }
- let res = await getPreDetal({
- preid: id
- });
- if (res.code === 0) {
- this.preInfo = res.data;
- if (type == 1 || type == "") {
- this.tjRecipeId = id;
- }
- this.setDrugsInfo(res.data.items);
- if (!type || type == 2) {
- // console.log(res.data, 'RES.datas');
- if (type == "") {
- this.changeAndJoin(1);
- } else {
- this.changeAndJoin(2);
- }
- } else {
- this.showDialog = true;
- }
- }
- },
- // 获取协定方详细信息
- async getAccordDetail(id) {
- let res = await getAccordDetail({
- pid: id
- });
- if (res.ResultCode == 0) {
- this.agreeInfo = res.Data;
- this.showAgree = true;
- }
- },
- // 获取专家经验详细信息
- async getExperinceDetail(id) {
- let res = await getExperinceDetail({
- pid: id
- });
- if (res.ResultCode == 0) {
- this.tjRecipeId = id;
- this.exprInfo = res.Data;
- this.showExpr = true;
- }
- },
- fmatby(val, mat) {
- return mat + "不宜与" + val + "同用" + ",";
- let list = val.split(",");
- let str = "";
- list.forEach(item => {
- str += mat + "不宜与" + item + "同用" + ",";
- });
- return str;
- },
- fsjw(val, mat) {
- return mat + "畏" + val + ",";
- let list = val.split(",");
- let str = "";
- list.forEach(item => {
- str += mat + "畏" + item + ",";
- });
- return str;
- },
- fsbf(val, mat) {
- return '<span style="color:red;">' + mat + "</span>" + "反" + val + ",";
- let list = val.split(",");
- let str = "";
- list.forEach(item => {
- str += mat + "反" + item + ",";
- });
- return str;
- },
- // 去重
- removeRepeat(arr, key) {
- let obj = {};
- arr = arr.reduce((pre, next) => {
- obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
- return pre;
- }, []);
- return arr;
- },
- countDose() {
- let show = false;
- this.rationalMed10.forEach(item => {
- if (item.showDose) {
- show = true;
- }
- });
- this.$forceUpdate();
- this.raDoseShow = show;
- },
- getEditPreNo() {
- return this.$route.query && this.$route.query.recipeType === "edit" ? this.$route.query.recipeID : this.getPreNo;
- },
- ...mapMutations({
- setDrugsInfo: "drug/setDrugsInfo"
- })
- },
- computed: {
- // 三种药房合计金额
- totalPrice() {
- return (this.contentTabs[0].check
- ? Number(this.chineseM.allMoney)
- : 0 + this.contentTabs[1].check
- ? Number(this.medicineC.allMoney)
- : 0 + this.contentTabs[2].check
- ? Number(this.suitScience.allMoney)
- : 0
- ).toFixed(2);
- },
- ...mapGetters(["getPatiensInfo", "getuserinfo", "getDrugInfo", "getIsSee", "getPreNo"])
- },
- filters: {
- ftsjj(value) {
- if (value == 1) {
- return "慎用";
- }
- if (value == 2) {
- return "忌用";
- }
- if (value == 3) {
- return "禁用";
- }
- },
- fyfsjj(value) {
- if (value == 1) {
- return "孕妇慎用";
- }
- if (value == 2) {
- return "孕妇忌用";
- }
- if (value == 3) {
- return "孕妇禁用";
- }
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- @import "../../style/common.scss";
- @import "../../style/media/diagnosis/prescribing-common.scss";
- .prescribing {
- height: 100%;
- // background: red;
- .pre-title {
- margin-bottom: 10px;
- .title-container {
- span {
- width: 3px;
- height: 14px;
- background: #5386f6;
- border-radius: 1px;
- display: inline-block;
- }
- div {
- font-size: 18px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #5386f6;
- margin-left: 9px;
- }
- }
- .patiens-msg {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- .p {
- margin-bottom: 5px;
- cursor: default;
- .patiens-name {
- color: #5386f6;
- font-weight: bold;
- font-size: 16px;
- }
- .patiens-desc {
- display: inline-block;
- .matname {
- color: #5386f6;
- }
- }
- .patiens-cate {
- font-weight: bold;
- }
- }
- }
- }
- .pre-left {
- height: 100%;
- width: 200px;
- padding: 10px 12px;
- background: #fff;
- box-sizing: border-box;
- margin-right: 5px;
- overflow-y: auto;
- height: 470px;
- .patiens-msg {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- h4 {
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- margin-bottom: 5px;
- }
- p {
- span {
- display: inline-block;
- width: 70px;
- text-align: right;
- }
- margin-bottom: 5px;
- }
- }
- .pre-steps {
- .find-more {
- cursor: pointer;
- img {
- width: 12px;
- }
- span {
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #ffae45;
- margin-left: 7px;
- }
- }
- .icon {
- width: 22px;
- }
- .step-body:hover {
- background: #d8d8d8;
- }
- .step-name {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- cursor: pointer;
- }
- }
- }
- .pre-right {
- overflow: auto;
- height: 100%;
- margin-left: 5px;
- width: 200px;
- padding: 10px 10px;
- background: #fff;
- box-sizing: border-box;
- overflow-y: auto;
- height: 470px;
- .tuidao {
- cursor: pointer;
- width: 70px;
- height: 26px;
- background: #ffae45;
- border-radius: 2px;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #ffffff;
- }
- }
- // 协定方
- .agreement {
- .agree-tab {
- div {
- width: 66px;
- height: 24px;
- background: rgba($color: #5386f6, $alpha: 0.1);
- font-size: 13px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- cursor: pointer;
- }
- .agree-active {
- background: #5386f6;
- color: #fff;
- }
- }
- .collapse {
- border: 1px solid #ebeef5;
- // padding: 0 0 0 10px;
- }
- .collapse-item {
- // margin-bottom: 10px;
- padding: 13px;
- border-bottom: 1px dashed #ebeef5;
- .med-name {
- // width: 70px;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- cursor: pointer;
- }
- .med-name:hover {
- background: #d8d8d8;
- }
- .med-btns {
- margin-left: 10px;
- div {
- width: 34px;
- height: 20px;
- background: #5386f6;
- border-radius: 2px;
- color: #fff;
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- cursor: pointer;
- color: #ffffff;
- }
- .bg-yellow {
- background: #ffae45;
- margin-left: 10px;
- }
- }
- }
- .collapse-more {
- // margin-top: 10px;
- img {
- width: 26px;
- }
- }
- .basis {
- border: 1px solid #ebeef5;
- .basis-top-search {
- padding: 9px 7px 9px 11px;
- border-bottom: 1px dashed #eaeaea;
- .search-btn {
- width: 37px;
- height: 28px;
- background: #ffb55f;
- border-radius: 0 2px 2px 0;
- cursor: pointer;
- font-size: 12px;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #ffffff;
- }
- }
- }
- }
- .pre-center {
- height: 100%;
- flex: 1;
- padding: 5px 5px;
- background: #fff;
- box-sizing: border-box;
- overflow: auto;
- overflow-y: auto;
- height: 470px;
- .center-tab {
- div {
- cursor: default;
- width: 146px;
- height: 26px;
- background: rgba($color: #5386f6, $alpha: 0.1);
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #666666;
- margin-right: 2px;
- span {
- margin-right: 9px;
- }
- }
- .active {
- background: #5386f6;
- color: #fff;
- }
- .checked {
- img {
- width: 16px;
- margin-top: 5px;
- }
- }
- }
- .header-total {
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- div {
- margin-left: 20px;
- }
- span {
- color: #ff3a3a;
- }
- }
- .center-table {
- border: 2px solid #dedede;
- padding: 0px 0 0;
- // min-height: 680px;
- // position: relative;
- .table-header {
- padding-bottom: 0px;
- border-bottom: 2px solid #dedede;
- .table-label {
- .label-item {
- cursor: pointer;
- width: 134px;
- border-right: 2px solid #eaeaea;
- div {
- color: #666;
- transform: rotate(45deg);
- font-size: 28px;
- margin-left: 12px;
- margin-top: 1px;
- }
- }
- span {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #666666;
- }
- .l_active {
- color: #5386f6;
- }
- }
- }
- .add-presc {
- width: 70px;
- height: 26px;
- background: #ffae45;
- border-radius: 4px;
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #ffffff;
- cursor: pointer;
- margin-right: 20px;
- }
- .table-container {
- padding: 37px 10px;
- .t-con-header {
- margin-bottom: 20px;
- .t-con-radio {
- flex: 1;
- }
- .t-radio-title {
- width: 82px;
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- }
- .t-radio-group {
- flex: 1;
- }
- .add-presc1 {
- width: 84px;
- height: 34px;
- background: #ffae45;
- border-radius: 4px;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: bold;
- color: #ffffff;
- }
- }
- }
- .table-show {
- width: 100%;
- // background: #5386F6;
- // overflow: hidden;
- .table-left-body {
- width: 49.5%;
- position: relative;
- perspective: 100px;
- padding-bottom: 53px;
- }
- .table-left {
- width: 100%;
- overflow-y: auto;
- border: 1px solid #dedede;
- box-sizing: border-box;
- .table-l-hader {
- white-space: nowrap;
- div {
- display: inline-block;
- // padding: 15px 10px;
- background: #f3fffb;
- text-align: center;
- height: 48px;
- line-height: 48px;
- border: 1px solid #dedede;
- border-bottom: 0 !important;
- // border-top: 0 !important;
- }
- .med-name {
- margin-left: 50px;
- }
- .kucun {
- padding-right: 120px;
- }
- .fixed-r {
- position: fixed;
- right: 0;
- }
- .fixed-left {
- position: fixed;
- left: 0;
- }
- }
- .table-l-item {
- white-space: nowrap;
- .bg-green {
- .div1 {
- background: #f3fffb;
- border: 1px solid #dedede;
- }
- }
- .div1 {
- display: inline-block;
- // padding: 15px 10px;
- background: #ffffff;
- text-align: center;
- height: 53px;
- line-height: 53px;
- border: 1px solid #dedede;
- z-index: 9999;
- border-top: 0 !important;
- }
- .med-name {
- margin-left: 50px;
- }
- .kucun {
- padding-right: 120px;
- border-right: 1px solid #dedede;
- }
- .fixed-r {
- position: fixed;
- right: 0;
- }
- .fixed-left {
- position: fixed;
- left: 0;
- // border-left: 1px solid #DEDEDE;
- }
- .no-data {
- width: 100%;
- box-sizing: border-box;
- // border-top: 1px solid #DEDEDE;
- position: relative;
- left: 0;
- right: 0;
- bottom: 0px;
- // float: left;
- }
- }
- }
- }
- .operate {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: space-around;
- img {
- width: 16px;
- }
- }
- .bottom-input {
- background: #fff;
- padding: 12.5px 30px 12.5px 52px;
- position: relative;
- // z-index: 999;
- // perspective: 100px;
- .div {
- width: 154px;
- }
- .table-choose {
- z-index: 9999;
- width: 332px;
- height: 221px;
- background: #ffffff;
- border: 2px solid #d8d8d8;
- position: relative;
- top: 2px;
- left: -48px;
- overflow: auto;
- .table-choose-h {
- background: #f3fffb;
- div {
- height: 36px;
- width: 73px;
- }
- div:first-child {
- width: 115px;
- }
- }
- .t-c-b {
- cursor: pointer;
- .td {
- background: #f3fffb;
- }
- p {
- border: 1px solid #ededed;
- height: 36px;
- width: 73px;
- // flex: 1;
- box-sizing: border-box;
- }
- p:first-child {
- width: 115px;
- }
- }
- }
- }
- .table-bottom {
- // position: absolute;
- // bottom: 0;
- // right: 0;
- // left: 0;\
- padding: 0 37px;
- margin-top: 241px;
- .header-about {
- .item {
- margin-right: 20px;
- margin-bottom: 10px;
- span {
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- }
- .div1 {
- width: 120px;
- }
- .div2 {
- width: 74px;
- }
- .city1 {
- width: 120px;
- }
- .div3 {
- width: 92px;
- }
- .div4 {
- width: 160px;
- }
- .input-suffix {
- line-height: 36px;
- }
- }
- .right {
- width: 70px;
- height: 26px;
- background: #ffae45;
- border-radius: 4px;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #ffffff;
- margin-bottom: 10px;
- cursor: pointer;
- }
- }
- }
- .table-b-bottom {
- padding: 10px 27px;
- border-top: 2px solid #dedede;
- margin-top: 10px;
- .t-b-l-item {
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- margin-right: 20px;
- span {
- color: #ff6245;
- }
- }
- .t-b-b-right {
- div {
- width: 130px;
- height: 46px;
- background: #ffae45;
- border-radius: 4px;
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 500;
- color: #ffffff;
- cursor: pointer;
- }
- .bg-green {
- background: #5386f6;
- margin-left: 20px;
- }
- }
- }
- // 中成药 和适宜技术配方
- .chinese_medicine {
- padding: 0 37px;
- .clearer {
- width: 84px;
- height: 34px;
- background: #ffae45;
- border-radius: 4px;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: bold;
- color: #ffffff;
- cursor: pointer;
- margin-bottom: 20px;
- }
- .c-m-table {
- width: 100%;
- overflow: hidden;
- .unit {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #000000;
- // margin-left: 10px;
- }
- .input {
- width: 40px;
- }
- }
- }
- }
- }
- }
- .table-choose3 {
- z-index: 99999;
- width: 332px;
- height: 221px;
- background: #ffffff;
- border: 2px solid #d8d8d8;
- // position: absolute;
- position: fixed;
- margin-top: 33px;
- // left: -4px;
- overflow: auto;
- .table-choose-h {
- background: #f3fffb;
- div {
- height: 36px;
- width: 73px;
- }
- div:first-child {
- width: 115px;
- }
- }
- .t-c-b {
- cursor: pointer;
- .td {
- background: #f3fffb;
- }
- p {
- border: 1px solid #ededed;
- height: 36px;
- width: 73px;
- // flex: 1;
- box-sizing: border-box;
- }
- p:first-child {
- width: 115px;
- }
- }
- }
- .drug-body {
- box-sizing: border-box;
- // height: 50vh;
- padding: 0 50px;
- .drug-item {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- margin-bottom: 10px;
- .trun-join {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- }
- .bg-yellow {
- margin-left: 10px;
- background: #ffae45 !important;
- }
- span {
- display: inline-block;
- width: 100px;
- text-align-last: justify;
- }
- div {
- flex: 1;
- img {
- width: 126px;
- height: 126px;
- // background: red;
- margin-right: 32px;
- }
- span {
- text-align-last: left;
- }
- }
- .detail {
- flex: 1;
- .btns {
- width: 80px;
- height: 30px;
- background: #5386f6;
- border-radius: 2px 2px 2px 2px;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #ffffff;
- cursor: pointer;
- margin-bottom: 20px;
- }
- .drug-detail {
- span {
- text-align-last: left;
- margin-right: 10px;
- margin-bottom: 10px;
- }
- }
- }
- }
- .drug-item1 {
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- margin-bottom: 15px;
- margin-right: 50px;
- div {
- flex: 1;
- }
- }
- .mad-cy {
- color: #5386f6;
- font-weight: bold;
- }
- }
- .testCase {
- padding: 0 50px;
- .testCase-item {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- margin-bottom: 10px;
- .testCase-left {
- text-align-last: justify;
- width: 112px;
- }
- .testCase-right {
- flex: 1;
- }
- .case-yijian {
- margin-bottom: 15px;
- span {
- margin-right: 5px;
- }
- .testCase-btns {
- width: 80px;
- height: 30px;
- background: #5386f6;
- border-radius: 2px 2px 2px 2px;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #ffffff;
- cursor: pointer;
- }
- }
- .case-detial {
- span {
- margin-right: 20px;
- margin-bottom: 15px;
- }
- }
- }
- .testCase-title {
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #5386f6;
- margin-bottom: 15px;
- }
- }
- // 推荐方剂
- .recommend {
- cursor: pointer;
- .arrow-left {
- width: 11px;
- height: 80px;
- background: #d8d8d8;
- border-radius: 6px;
- img {
- width: 6px;
- }
- }
- .banner {
- flex: 1;
- height: 80px;
- margin: 0 0px;
- overflow-y: auto;
- .r-banner-body {
- cursor: pointer;
- .r-body-item {
- margin-bottom: 10px;
- .med-name {
- // width: 70px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- span {
- cursor: pointer;
- }
- }
- .icon-expr {
- width: 18px;
- }
- .med-name1 {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- flex: 1;
- img {
- width: 18px;
- margin-right: 5px;
- }
- span {
- display: inline-block;
- // width: 70px;
- width: 100%;
- // flex: 1;
- // background: #5386F6;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- // color: #333333;
- color: #5386f6;
- cursor: pointer;
- }
- }
- // .med-name-bg:hover {
- // background: #D8D8D8;
- // }
- .med-name:hover {
- background: #d8d8d8;
- }
- .med-btns {
- div {
- width: 34px;
- height: 20px;
- background: #5386f6;
- border-radius: 2px;
- color: #fff;
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- cursor: pointer;
- color: #ffffff;
- }
- .bg-yellow {
- background: #ffae45;
- margin-left: 10px;
- }
- }
- }
- }
- }
- .active {
- color: #5386f6 !important;
- }
- }
- .pre-steps::v-deep .el-step__icon.is-text {
- border: 0;
- }
- .collapse::v-deep .el-collapse-item__header {
- padding: 0 0 0 10px;
- border-bottom: 1px dashed #ebeef5;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
- .body-msg {
- span {
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- margin-bottom: 5px;
- }
- }
- .collapse ::v-deep .el-collapse-item__content {
- padding-bottom: 5px;
- }
- .c-m-table::v-deep .el-table .cell {
- text-align: center;
- }
- .table-show::v-deep .el-table .cell {
- text-align: center;
- }
- .c-m-table::v-deep .el-select input {
- padding: 0 15px 0 5px;
- }
- .table-show ::v-deep .el-select input {
- padding: 0 15px 0 5px;
- }
- .t_dose::v-deep .el-input__inner {
- // text-align: left;
- padding: 0 5px !important;
- }
- .city::v-deep .el-select input {
- padding: 0 20px 0 10px;
- // height: 32px;
- }
- .xuewei::v-deep .el-select {
- width: 100%;
- }
- // 滚动条位置
- .prescribing ::v-deep .__bar-is-vertical {
- right: -1px !important;
- }
- // 隐藏横向滚动条
- .prescribing ::v-deep .__bar-is-horizontal {
- display: none !important;
- }
- .table-left-body::v-deep .el-table__empty-text {
- color: #fff;
- }
- </style>
- <style lang="scss" scoped>
- @import "../../style/media/diagnosis/prescribing.scss";
- </style>
- <style>
- /* @media screen and (max-width: 768px) {
- body {
- width: 100% !important;
- }
- } */
- </style>
|