cnhis-design-vue 3.3.1-beta.0 → 3.3.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/index.d.ts +17 -147
- package/es/components/ai-chat/src/Index.vue.d.ts +17 -147
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +2 -55
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.d.ts +7 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/utils/index.d.ts +0 -1
- package/es/components/ai-chat/src/utils/index.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +7 -6
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +1 -2
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/editor/src/Editor.js +1 -1
- package/es/components/editor/style/index.css +0 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/field-editor/index.d.ts +7 -1
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
- package/es/components/form-config/index.d.ts +33 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +33 -3
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +7 -1
- package/es/components/form-render/index.d.ts +7 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/input.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
- package/es/components/form-render/src/types/index.d.ts +2 -0
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +24 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
- package/es/components/shortcut-setter/index.d.ts +7 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +7 -1
- package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
- package/es/shared/components/DateIcon/index.d.ts +2 -0
- package/es/shared/components/DateIcon/index.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/ai-chat/src/api/index.d.ts +0 -6
- package/es/components/ai-chat/src/api/index.js +0 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -44
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -1
- package/es/components/ai-chat/src/components/ChatMainInner.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -56
- package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -1
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -1
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
- package/es/components/ai-chat/src/components/card/JsonCard.js +0 -1
- package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +0 -14
- package/es/components/ai-chat/src/components/card/SelectIcon.js +0 -1
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
- package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -2
- package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -1
- package/es/shared/assets/img/file-emr.png.js +0 -1
- package/es/shared/assets/img/file.png.js +0 -1
- package/es/shared/assets/img/use.png.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
import{defineComponent as o,inject as e,ref as t,computed as i,watch as a,onBeforeUnmount as n,withDirectives as r,openBlock as s,createElementBlock as l,unref as u,createBlock as d,createCommentVNode as c,createElementVNode as p,toDisplayString as m,normalizeStyle as f,createVNode as v,withCtx as w,createTextVNode as h,vShow as g}from"vue";import{NIcon as y,NSpace as _,NButton as F}from"naive-ui";import{StopCircleOutline as S}from"@vicons/ionicons5";import{InjectionAIChat as k}from"../types/index.js";import{useIntervalFn as x,promiseTimeout as C}from"@vueuse/core";import $ from"../../../audio-sdk/src/audioSDK.js";import{uploadFileApi as j}from"../api/index.js";import{uuidGenerator as M}from"../../../../shared/utils/index.js";import{$message as z}from"../utils/index.js";const A={class:"ai-chat-doctor__audio"};var I=o({__name:"ChatAudio",props:{show:{type:Boolean}},emits:["update:show"],setup(o,{emit:I}){const B=o,D=$.create(),{state:T,vaa07:b,immediatelyRecording:q}=e(k),K=t(0);let L="";const{pause:N,resume:O,isActive:R}=x((()=>{K.value++}),1e3,{immediate:!1}),U=i((()=>R.value?"正在录音中...":"录音已暂停")),E=i((()=>{const o=Math.floor(K.value/3600),e=Math.floor(K.value%3600/60),t=K.value%60,i=e.toString().padStart(2,"0"),a=t.toString().padStart(2,"0");if(o>0){return`${o.toString().padStart(2,"0")}:${i}:${a}`}return`${i}:${a}`}));async function G(){try{if((null==(o=null==navigator?void 0:navigator.userAgent)?void 0:o.includes("Chrome"))&&!(null==window?void 0:window.isSecureContext)&&(I("update:show",!1),z.warning("当前使用的http协议默认不支持麦克风权限,需要用户开启浏览器麦克风权限"),1))return;const e=await D.start(void 0,{timed:1800,recognizable:!1,showModal:!1});if(I("update:show",!1),"click"!==L)return;const{result:t,data:i}=e||{};if("success"!==t)return;if(i){const o=new File([i],`${M()}.mp3`,{type:i.type}),e=new FormData;e.append("file",o),e.append("channelId","MINIO");const t=await j(e),a=(null==t?void 0:t.path)||"";console.log("音频地址 ==>",a),T.params={audioUrl:a,opType:"create_inquiry"},T.sending=!0,T.loading=!0,T.loadingText="系统正在对您的对话内容进行梳理整合,转化为规范的结构化问诊记录"}}catch(o){console.log(o),I("update:show",!1),"fail"===(null==o?void 0:o.result)&&o.msg&&z.warning(o.msg)}var o}function H(){N(),D.pause()}function J(){O(),D.resume()}async function P(o){L=o||"",null==D||D.stop(),I("update:show",!1)}return a((()=>B.show),(o=>{o?(L="",K.value=0,O(),G()):N()}),{immediate:!0}),a((()=>b.value),(async o=>{const e=B.show;B.show&&P(),q.value&&(e&&await C(10),I("update:show",!0))}),{immediate:!0}),n((()=>{$.destroy()})),(e,t)=>r((s(),l("div",A,[u(R)?c("v-if",!0):(s(),d(u(y),{key:0,size:"42",color:"#FF1818",component:u(S)},null,8,["component"])),p("p",null,m(u(U)),1),p("h3",{style:f(u(R)?"":"color: #FF1818")},m(u(E)),5),v(u(_),{"wrap-item":!1,size:15},{default:w((()=>[r(v(u(F),{round:"",onClick:H},{default:w((()=>[h("暂停")])),_:1},512),[[g,u(R)]]),r(v(u(F),{round:"",onClick:J},{default:w((()=>[h("继续")])),_:1},512),[[g,!u(R)]]),v(u(F),{round:"",color:"#FF1818",onClick:t[0]||(t[0]=()=>P("click"))},{default:w((()=>{var o;return[h((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.77"))||"结束")]})),_:1})])),_:1})],512)),[[g,o.show]])}});export{I as default};
|
@@ -1,2 +0,0 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
-
export default _default;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{defineComponent as e,inject as n,ref as t,computed as o,watch as s,createVNode as a,nextTick as r,resolveComponent as l}from"vue";import{NTooltip as i,NButton as u,NIcon as c}from"naive-ui";import{InjectionAIChat as d}from"../types/index.js";import{isArray as v,cloneDeep as p,isFunction as m}from"lodash-es";import{uuidGenerator as g}from"../../../../shared/utils/index.js";import{useLocalStorage as h,promiseTimeout as f}from"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{SyncOutline as y}from"@vicons/ionicons5";import{useScrollLoading as x}from"../../../../shared/hooks/useScrollLoading.js";import T from"./card/JsonCard.js";import{getHistoryRecordApi as _,conversationApi as j}from"../api/index.js";import{useProgram as C}from"../hooks/useProgram.js";var I=e({name:"ChatMain",inheritAttrs:!1,components:{JsonCard:T},setup(e,{attrs:T,slots:I,emit:b}){const w=h("aISessionIdMap",new Map),{patientInfo:M,state:q,vaa07:k}=n(d),{programMethod:S,MedicalOrderId:O}=C(),R=t(null),J=t([]),U={page:0,hasMore:!0};x(R,(()=>{A()}),"top");const z=o((()=>w.value.get(k.value)));async function A(){if(!k.value)return;if(!U.hasMore||!z.value)return;U.page++,1==U.page&&(J.value=[]);const e=await _({sessionId:z.value,page:U.page,pageSize:20}),{rows:n,query:t={}}=e||{};v(n)&&(n.forEach((e=>{v(e.contents)&&e.contents.length>1&&e.contents.reverse()})),J.value.length<=+t.records&&(J.value=U.page>1?[...J.value,...n]:n,J.value.length>=+t.records&&(U.hasMore=!1,console.log("没有更多消息了"))))}async function E(e){var n;v(e.contents)&&(J.value.unshift(e),await r(),null==(n=R.value)||n.scrollTo({top:0,behavior:"auto"}))}function H(e,n){var t;const{contentType:o,messageType:s}=(null==(t=null==e?void 0:e.contents)?void 0:t[n])||{};return"json"===o&&"retry_inquiry"!==s}function L(e){const n=e.replace(/\\n|\n|\r\n/g,"<br>").split("<br>").filter((e=>!!e)).map(((e,n,t)=>[e,n===t.length-1?null:a("br",null,null)]));return n.length?[n]:null}function P(e,n){var t,o,s,r,d;const{contents:v=[],msgId:p=""}=e;return"json"===(null==(t=v[n])?void 0:t.contentType)?"retry_inquiry"===(null==(o=v[n])?void 0:o.messageType)?[L((null==(r=null==(s=v[n])?void 0:s.content)?void 0:r.errorMsg)||""),a(i,{trigger:"hover"},{default:()=>"重新生成",trigger:()=>a(u,{style:"position: relative;top: 3px;margin-left: 8px",type:"primary",text:!0,onClick:()=>{var e,t,o;return o=null==(t=null==(e=v[n])?void 0:e.content)?void 0:t.audioUrl,q.params={audioUrl:o,opType:"create_inquiry"},q.sending=!0,q.loading=!0,void(q.loadingText="系统正在对您的对话内容进行梳理整合,转化为规范的结构化问诊记录")}},{icon:()=>a(c,{component:y},null)})})]:function(e,n){return a(l("json-card"),{item:e,messageItem:n},null)}(e,v[n]):L((null==(d=v[n])?void 0:d.content)||"")}function B({role:e=""}){return"user"===e}return s((()=>k.value),(e=>{q.showRight=!1,J.value=[],U.page=0,U.hasMore=!0,A()}),{immediate:!0}),s((()=>q.reportContent),(e=>{e&&(E(e),q.reportContent=null)})),s((()=>q.sending),(async e=>{var n,t,o,s,a;if(e){const{opType:e}=q.params||{};if(!e&&q.sendContent&&J.value.unshift({msgId:g(),contents:[{role:"user",content:q.sendContent}]}),null==(n=R.value)||n.scrollTo({top:0,behavior:"auto"}),e&&["recommend_treatment_plan","recommend_diagnosis","recommend_examination"].includes(e)){if(J.value.length>0){const e=J.value.find((e=>{var n;return!B(null==(n=null==e?void 0:e.contents)?void 0:n[0])}));e&&Object.assign(q.params,p(e))}Object.assign(q.params,{contents:[{role:"user",content:"",contentType:"text"}]})}z.value&&(q.params.sessionId=z.value);try{const n=await j({contents:[{role:"user",content:q.sendContent,contentType:"text"}],platform:"web",sessionType:"text_chat",source:"global",configs:M.value.info,...q.params});(null==n?void 0:n.sessionId)&&k.value&&!z.value&&w.value.set(k.value,n.sessionId),"diagnosis"===e&&(q.refreshMedical=!0),v(n.contents)&&n.contents.length>1&&n.contents.reverse(),E(n),e&&["create_inquiry","create_medical"].includes(e)&&("create_inquiry"===e?"retry_inquiry"!==(null==(o=null==(t=null==n?void 0:n.contents)?void 0:t[0])?void 0:o.messageType)&&(q.consultationContent=n,q.showRight=!0):(q.consultationContent=null,await f(1e3),q.showRight=!0,await S(O,{vac01:(null==(a=null==(s=M.value)?void 0:s.info)?void 0:a.vac01)||"1878974046080958465",type:1}))),e||(q.sendContent=""),q.params={}}catch(e){console.log("error ==>",e)}finally{q.sending=!1,q.loading=!1,q.loadingText=""}}})),()=>[a("section",{class:"chat-main",ref:R,style:"column-reverse"},[[q.loading?a("div",{class:"message-item"},[a("div",{class:"content-box"},[a("div",{class:"content loading"},[a("span",{class:"ai-chat__loading-icon"},null),a("span",null,[q.loadingText||"正在整合数据..."])])])]):null,J.value.map((e=>e.contents.map(((n,t)=>P(e,t)?a("div",{class:"message-item",key:e.msgId+t},[a("div",{class:["content-box",B(n)?"mine":""]},[a("div",{class:["content",{"content-json":!m(n.render)&&H(e,t)}]},[m(n.render)?n.render():P(e,t)])])]):null))))]])]}});export{I as default};
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import { AnyObject } from '../../../../shared/types';
|
2
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
3
|
-
medicalLabel: {
|
4
|
-
key: string;
|
5
|
-
title: string;
|
6
|
-
}[];
|
7
|
-
state: any;
|
8
|
-
patientInfo: any;
|
9
|
-
toolbarConfig: {
|
10
|
-
toolbarKeys: never[];
|
11
|
-
};
|
12
|
-
content: import("vue").Ref<string>;
|
13
|
-
key: import("vue").Ref<string>;
|
14
|
-
handleSave: () => Promise<void>;
|
15
|
-
createMedicalRecord: () => void;
|
16
|
-
extractContentByTitle: () => AnyObject;
|
17
|
-
NIcon: any;
|
18
|
-
NSpace: any;
|
19
|
-
NButton: any;
|
20
|
-
Editor: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
21
|
-
editorConfig: {
|
22
|
-
type: ObjectConstructor;
|
23
|
-
};
|
24
|
-
toolbarConfig: {
|
25
|
-
type: ObjectConstructor;
|
26
|
-
};
|
27
|
-
uploadImgUrl: {
|
28
|
-
type: StringConstructor;
|
29
|
-
};
|
30
|
-
isDisabled: {
|
31
|
-
type: BooleanConstructor;
|
32
|
-
default: boolean;
|
33
|
-
};
|
34
|
-
}, {
|
35
|
-
editorRef: import("vue").ShallowRef<any>;
|
36
|
-
renderVN: () => JSX.Element;
|
37
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
38
|
-
editorConfig: {
|
39
|
-
type: ObjectConstructor;
|
40
|
-
};
|
41
|
-
toolbarConfig: {
|
42
|
-
type: ObjectConstructor;
|
43
|
-
};
|
44
|
-
uploadImgUrl: {
|
45
|
-
type: StringConstructor;
|
46
|
-
};
|
47
|
-
isDisabled: {
|
48
|
-
type: BooleanConstructor;
|
49
|
-
default: boolean;
|
50
|
-
};
|
51
|
-
}>> & {}, {
|
52
|
-
isDisabled: boolean;
|
53
|
-
}>>;
|
54
|
-
CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
55
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
56
|
-
export default _default;
|
@@ -1 +0,0 @@
|
|
1
|
-
import t from"./ChatRight.vue2.js";import e from"../../../../_virtual/_plugin-vue_export-helper.js";var r=e(t,[["__file","ChatRight.vue"]]);export{r as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{defineComponent as t,inject as n,reactive as e,ref as o,watch as i,withDirectives as l,openBlock as a,createElementBlock as s,createElementVNode as c,vShow as r,unref as u,createVNode as d,withCtx as y,createTextVNode as p}from"vue";import{NButton as f,NIcon as k,NSpace as m}from"naive-ui";import{InjectionAIChat as g}from"../types/index.js";import{$message as _}from"../utils/index.js";import h from"../../../editor/index.js";import{CloseOutline as v}from"@vicons/ionicons5";import{saveApi as j}from"../api/index.js";const C={class:"ai-chat-doctor__right"},w={class:"header"},b={class:"main"};var x=t({__name:"ChatRight",setup(t){const x=[{key:"zs_yy",title:"主诉"},{key:"xbs_fuk",title:"现病史"},{key:"jws_vtk",title:"既往史"},{key:"patient_allergy_sync",title:"过敏史"},{key:"tgjcms_wsssss",title:"体格检查描述"},{key:"marriage",title:"婚姻状况"},{key:"nation",title:"民族"},{key:"profession",title:"职业"},{key:"jkzk_wyuu",title:"一般健康状况"},{key:"ryljlz_tbyvrt",title:"外长期居住史"},{key:"yjbz_qisf1",title:"饮酒标志"},{key:"gydwufcjfsxwzjcs_aogt_oietyntrrqk",title:"工业毒物、粉尘及放射性物质接触史"},{key:"yqtysjcs_ua_uirqk",title:"疫区、疫水接触史"},{key:"ryct_tbsw",title:"入院查体"},{key:"fzjclg_lessxj",title:"辅助检查结果"},{key:"o_hn_iyjc_hr",title:"互认回填"},{key:"cbzd_phyo",title:"初步诊断"},{key:"zljh_yuya",title:"诊疗计划"},{key:"wdcqjzs_qftanwk",title:"外地长期居住史"}],{state:z,patientInfo:q}=n(g),R=e({toolbarKeys:[]}),D=o(""),$=o(Date.now().toString());async function I(){var t;try{const n=E();z.consultationContent.contents[0].content.details.autoBackFillData=n,await j({msgId:z.consultationContent.msgId,contents:z.consultationContent.contents,configs:null==(t=q.value)?void 0:t.info}),_.success("保存成功")}catch(t){console.log("error ==>",t)}}function B(){const t=E();console.log("json ==>",t,z.consultationContent),z.consultationContent.contents[0].content.details.autoBackFillData=t,z.params={opType:"create_medical",...z.consultationContent,contents:[{role:"user",content:"",contentType:"text"}],medicalInfo:z.consultationContent},z.sending=!0,z.loading=!0,z.loadingText="系统进入深度分析模式,正在整合数据,调取主诉,获取现病史、既往病史,读取过敏史,综合多维度信息生成诊断建议"}function E(){const t={};return x.forEach((n=>{const e=new RegExp(`<p><span.*?><strong>\\d+、${n.title}<\\/strong><\\/span><\\/p><p>(.*?)<\\/p>`,"i"),o=D.value.match(e);if(o&&o[1]){const e=o[1].trim();t[n.key]="<br>"===e?"":e}})),t}return i((()=>z.consultationContent),(t=>{var n,e,o;if(t){const{autoBackFillData:i}=(null==(o=null==(e=null==(n=null==t?void 0:t.contents)?void 0:n[0])?void 0:e.content)?void 0:o.details)||{};if(!i)return;x.forEach(((t,n)=>{D.value+=`<p><span style="font-size: 16px;"><strong>${n+1}、${t.title}</strong></span></p><p><span>${i[t.key]||""}</span></p><p>${n<x.length-1?"<br>":""}`}))}})),i((()=>z.showRight),(t=>{t||(z.consultationContent=null)})),i((()=>z.refreshMedical),(t=>{t&&($.value=Date.now().toString(),z.refreshMedical=!1)})),(t,n)=>l((a(),s("div",C,[c("div",w,[l(c("h4",null,"问诊记录",512),[[r,u(z).consultationContent]]),d(u(f),{quaternary:"",onClick:n[0]||(n[0]=()=>u(z).showRight=!1)},{icon:y((()=>[d(u(k),{size:"20",component:u(v)},null,8,["component"])])),_:1})]),l(c("div",b,[d(u(h),{"toolbar-config":R,modelValue:D.value,"onUpdate:modelValue":n[1]||(n[1]=t=>D.value=t)},null,8,["toolbar-config","modelValue"]),d(u(m),{class:"footer","wrap-item":!1},{default:y((()=>[d(u(f),{round:"",class:"gradient",disabled:u(z).loading,onClick:B},{default:y((()=>[p("审核完成")])),_:1},8,["disabled"]),d(u(f),{round:"",onClick:I},{default:y((()=>[p("暂存")])),_:1})])),_:1})],512),[[r,u(z).consultationContent]]),l((a(),s("div",{class:"main",id:"aiChatMedicalRecord",key:$.value})),[[r,!u(z).consultationContent]])],512)),[[r,u(z).showRight]])}});export{x as default};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { PropType } from 'vue';
|
2
|
-
import { AnyObject } from '../../../../../shared/types';
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
4
|
-
item: {
|
5
|
-
type: PropType<AnyObject>;
|
6
|
-
default: () => {};
|
7
|
-
};
|
8
|
-
messageItem: {
|
9
|
-
type: PropType<AnyObject>;
|
10
|
-
default: () => {};
|
11
|
-
};
|
12
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
13
|
-
item: {
|
14
|
-
type: PropType<AnyObject>;
|
15
|
-
default: () => {};
|
16
|
-
};
|
17
|
-
messageItem: {
|
18
|
-
type: PropType<AnyObject>;
|
19
|
-
default: () => {};
|
20
|
-
};
|
21
|
-
}>> & {}, {
|
22
|
-
item: AnyObject;
|
23
|
-
messageItem: AnyObject;
|
24
|
-
}>;
|
25
|
-
export default _default;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{defineComponent as e,inject as a,ref as i,computed as s,createVNode as l,resolveComponent as t,createTextVNode as n}from"vue";import{NSpace as o,NIcon as d,NImage as c,NButton as r}from"naive-ui";import m from"../../../../../shared/assets/img/file.png.js";import u from"../../../../../shared/assets/img/file-emr.png.js";import p from"../../../../../shared/assets/img/use.png.js";import{CheckmarkCircle as v}from"@vicons/ionicons5";import g from"./SelectIcon.js";import{InjectionAIChat as f}from"../../types/index.js";import{useProgram as h}from"../../hooks/useProgram.js";import{isArray as y,isString as b}from"lodash-es";var x=e({name:"ChatJsonCard",inheritAttrs:!1,props:{item:{type:Object,default:()=>({})},messageItem:{type:Object,default:()=>({})}},components:{NSpace:o,NIcon:d,NImage:c,SelectIcon:g},emits:[],setup(e,{attrs:o,slots:d,emit:c}){const{state:g,patientInfo:x}=a(f),{programMethod:_,MedicalOrderId:C,ReportId:I}=h(),{messageType:k,content:T}=e.messageItem,w=i([]),j=i([]),N=s((()=>{var e,a;return(null==(a=null==(e=x.value)?void 0:e.info)?void 0:a.vac01)||"1878974046080958465"})),S=s((()=>null==T?void 0:T.diagnosis)),E=s((()=>{var e;return"diagnosis_added"===k&&(null==(e=S.value)?void 0:e.length)})),O=s((()=>E.value||"medical_added"===k)),q=s((()=>"diagnosis"===k||"diagnosis_added"===k||"treatment_plan"===k));var D,P;"diagnosis_added"===k&&(w.value=null==(P=null==(D=T.recommendedExaminations)?void 0:D.map)?void 0:P.call(D,(e=>e.name)));const A=(e,a="name")=>{j.value.includes(e[a])?j.value=j.value.filter((i=>i!==e[a])):j.value.push(e[a])};function J(a,i){var s,l;null==(s=null==a?void 0:a.preventDefault)||s.call(a),null==(l=null==a?void 0:a.stopPropagation)||l.call(a);let t=i?[i]:[];arguments.length||(t=T.possibleConditions.filter((e=>j.value.includes(e.code)))),t.length&&(g.params={...e.item,opType:"diagnosis",contents:[{role:"user",content:"",contentType:"text"}],possibleConditions:t},g.sending=!0,g.loading=!0,g.loadingText="依据当前诊断与病历内容分析,正在筛为您筛选和匹配最适合的检验检查项目")}async function R(a,i){var s,l;if(b(a)||(null==(s=null==a?void 0:a.preventDefault)||s.call(a),null==(l=null==a?void 0:a.stopPropagation)||l.call(a)),"edit"===a){const e=i?w.value.includes(i.name)?[i.name]:[]:[...w.value];await _(C,{bbx05List:JSON.stringify(e),vac01:N.value,type:3})}else{let a=i?[i]:[];i||(a=T.recommendedExaminations.filter((e=>w.value.includes(e.name)))),g.params={...e.item,opType:"medical_order",contents:[{role:"user",content:"",contentType:"text"}],recommendedExaminations:a},g.sending=!0,g.loading=!0}}const L=async()=>{var e;const a=(null==(e=T.reports)?void 0:e[0])||{};await _(I,{vaa07:N.value,reportType:a.reportType,reportId:a.reportId})},M=async(e,a)=>{var i,s;null==(i=null==e?void 0:e.preventDefault)||i.call(e),null==(s=null==e?void 0:e.stopPropagation)||s.call(e);const l=a?[a.name]:j.value;await _(C,{drugNameList:JSON.stringify(l),vac01:N.value,type:3})},z=e=>{if(!("diagnosis_added"===k?!w.value.length:!j.value.length))return"diagnosis"===k?J():"diagnosis_added"===k?R(e):"treatment_plan"===k?M():void 0};async function H(){"medical"===k?(async()=>{g.consultationContent=null,g.showRight=!0,await _(C,{vac01:N.value,type:1})})():(g.consultationContent=e.item,g.showRight=!0)}const W=()=>l("div",{class:"diagnosis-added-box"},[l("div",{class:"recommended-wrap"},[l("div",{class:"title"},[n("检验检查推荐")]),T.recommendedExaminations.map((e=>l("div",{class:"recommended-item"},[l("div",{class:"top"},[l("div",{class:"left-tag"},[l("span",{class:["recommended-tag",{active:w.value.includes(e.name)}],onClick:()=>(e=>{w.value.includes(e.name)?w.value=w.value.filter((a=>a!==e.name)):w.value.push(e.name)})(e)},[e.name,l(t("select-icon"),{class:"select-icon",width:16},null)])]),l("img",{class:"right-icon",src:p,onClick:a=>R(a,e)},null)]),l("div",{class:"desc"},[e.description])])))])]);const $=()=>{if(!O.value)return null;return("medical_added"===k?[{}]:S.value).map((e=>l("div",{class:"card-header"},[l("span",{class:"left-title"},[l(t("n-icon"),{component:v},null),"medical_added"===k?"已完成申请单开立":`已添加诊断:${e.name}`]),"medical_added"===k?null:l("span",{class:"right-desc"},[n("创建时间: "),e.createdTime])])))},B=()=>{if(!q.value)return null;const e="diagnosis_added"===k?!w.value.length:!j.value.length;return l("div",{class:"card-footer"},[l("span",{class:"left-desc"},[n("请注意,推荐信息由AI生成,结果仅供临床参考")]),l("div",{class:"right-btns"},[l(r,{size:"large",disabled:e,onClick:()=>z("edit")},{default:()=>[n("编辑所选")]}),l("span",{class:["right-btn",{disabled:e}],onClick:()=>z()},[n("引用所选")])])])},F=()=>"inquiry"==k||"medical"==k?(()=>{var e,a;const i="inquiry"===k;return l("div",{class:"inquiry_medical-box",onClick:()=>H()},[l("div",{class:"left-img"},[l("img",{src:i?m:u},null)]),l("div",{class:"right-text"},[l("p",{class:"top-info"},[i?null==(e=T.summary)?void 0:e.inquiryStr:T.info]),l("p",{class:"sum-time"},[n("创建时间:"),(null==(a=T.summary)?void 0:a.creationTime)||T.creationTime])])])})():"diagnosis"==k?l("div",{class:"diagnosis-box"},[l("div",{class:"title"},[n("诊断辅助")]),l("div",{class:"desc"},[T.patientHistory]),T.possibleConditions.map((e=>l("div",{class:["con-item",{active:j.value.includes(e.code)}],onClick:()=>A(e,"code")},[l("div",{class:"top-content"},[l("div",{class:"left_wrap"},[l("a",{href:e.link,target:"_blank"},[n("【"),e.condition,n("】")]),e.code,n("("),e.probability,n(")")]),l("img",{class:"right-icon",src:p,onClick:a=>J(a,e)},null)]),l("div",{class:"btm-desc"},[e.description])])))]):"diagnosis_added"==k?W():"treatment_plan"==k?l("div",{class:"treatment-plan-box"},[l("div",{class:"top-div"},[l("div",{class:"title"},[T.title])]),l("div",{class:"desc"},[T.description]),l("div",{class:"medication-wrap"},[l("div",{class:"title"},[n("药物")]),T.medications.map((e=>l("div",{class:["medication-item",{active:j.value.includes(e.name)}],onClick:()=>A(e)},[l("div",{class:"top"},[l("div",{class:"name"},[e.name]),l("img",{class:"right-icon",src:p,onClick:a=>M(a,e)},null)]),l("ul",null,[l("li",null,[n("用量: "),e.dosage,e.purpose]),l("li",null,[n("用法: "),e.usageInstructions])])])))]),l("div",{class:"precaution-wrap"},[l("div",{class:"title"},[n("注意事项")]),l("div",{class:"precaution-div"},[T.precautions.map(((e,a)=>l("div",{class:"treatment-item"},[a+1,n(". "),e])))])])]):"report_message"==k?(()=>{var e,a;const i=(null==(e=T.reports)?void 0:e[0])||{},s=(null==(a=i.reportInterpretation)?void 0:a.replace(/\\n|\n|\r/g,"<br>").split("<br>"))||[""],o=s.map(((e,a)=>[e,a===s.length-1?null:l("br",null,null)]));return l("div",{class:"report-message-box"},[l("div",{class:"top-title"},[l("div",{class:"left-title"},[l(t("n-icon"),{component:v},null),i.reportName]),l("div",{class:"right-detail"},[l(r,{text:!0,onClick:L},{default:()=>[n("报告详情")]}),l(r,{text:!0},{default:()=>[n("推荐方案")]})])]),l("div",{class:"center-img"},[i.images.map((e=>"pdf"===e.imageType?l("embed",{class:"pdf-embed",src:e.image,type:"application/pdf"},null):l(t("n-image"),{src:e.image},null)))]),l("div",{class:"bottom-interpretation"},[o,l("div",{class:"desc-tip"},[n("请注意,辅助诊断由AI推荐,结果仅供临床参考。")])])])})():"medical_added"==k?function(){if(!y(T))return null;const e=T.map((e=>{const{itemName:a,sample:i,execDeptName:s}=e||{};let t="";a&&(t+=a);const n=()=>!t||t.endsWith("/")?"":"/";return i&&(t+=n()+i),s&&(t+=n()+s),l("div",{class:"item"},[l("span",null,[t]),l("span",{class:"time"},[e.beginExecTime])])}));return l("div",{class:"medical-added-box"},[e])}():"默认json内容";return()=>l("section",{class:"json-card_section"},[$(),l("div",{class:"card-content"},[F()]),B()])}});export{x as default};
|
@@ -1,14 +0,0 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
2
|
-
width: {
|
3
|
-
type: NumberConstructor;
|
4
|
-
default: number;
|
5
|
-
};
|
6
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
7
|
-
width: {
|
8
|
-
type: NumberConstructor;
|
9
|
-
default: number;
|
10
|
-
};
|
11
|
-
}>>, {
|
12
|
-
width: number;
|
13
|
-
}>;
|
14
|
-
export default _default;
|
@@ -1 +0,0 @@
|
|
1
|
-
import{defineComponent as t,createVNode as e}from"vue";var r=t({name:"SelectIcon",props:{width:{type:Number,default:20}},setup:t=>()=>e("svg",{width:`${t.width}px`,height:`${t.width}px`,viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("g",{id:"门诊预约",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e("g",{id:"预约记录-开发渠道",transform:"translate(-339, -270)"},[e("g",{id:"编组-8",transform:"translate(0, 184)"},[e("g",{id:"3",transform:"translate(243, 66)"},[e("g",{id:"编组-2",transform:"translate(96, 20)"},[e("path",{d:"M20,0 L20,16 C20,18.209139 18.209139,20 16,20 L0,20 L0,20 L20,0 Z",id:"Rectangle-6",fill:"#2474FF"},null),e("path",{d:"M17.1936275,10.2928932 L18.607841,11.7071068 L12.24388,18.0710678 L12.242,18.0698932 L8,13.8284271 L9.41421356,12.4142136 L12.243,15.2428932 L17.1936275,10.2928932 Z",id:"Combined-Shape",fill:"#FFFFFF"},null)])])])])])])});export{r as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
function r(){return{MedicalOrderId:"Y3ncua3BP36",ReportId:"Ys6k60gBP54",programMethod:async(r,a)=>{var n,e;try{return await(null==(e=null==(n=window._programArrange)?void 0:n.next)?void 0:e.call(n,{bpmnProcessId:r,variables:{...a}}))}catch(r){throw new Error("流程编排执行失败!")}}}}export{r as useProgram};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{onBeforeUnmount as o}from"vue";import{isValidJSON as e}from"../utils/index.js";function n(n,t){if(!n.orgId||!n.userId)return;let r=!1;const s=new WebSocket(`/flow/ai/opd/${n.orgId}_${n.userId}`);s.onopen=()=>{r=!0,console.log("0 websocket连接成功 ==>")},s.onerror=()=>console.log("WebSocket连接失败"),s.onmessage=o=>{const{data:n}=o||{};if(console.log("张铁柱 ==>",o),!e(n))return;const r=JSON.parse(n);t.reportContent=r||null},async function o(e=0){return e>5?console.log("websocket连接失败 ==>"):r?console.log("websocket连接成功 ==>"):void setTimeout((()=>{o(++e)}),100)}(),o((()=>{s.close()}))}export{n as useWebsocket};
|
@@ -1 +0,0 @@
|
|
1
|
-
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAoCAMAAABO3sPvAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTLrH2b7L28DO3c3Y5QBl/wBm/7TC1rrI2rzK28rW4////7LB1QBm/9ff6X25/sXQ3+ry+8Pf/zub/wB9/wOG/yYY+3cAAAALdFJOUwDjoXQoiO5//r9Z8rE0jwAAAOVJREFUOMvt1NsOgjAMBuAhICitXTt4/1e1wxhZ6SAx8c7/gnD41i4lWQihu4xg07ShTNeAl1upFMWHzWjYHeAx7RNLNgCwo6aymqrJTVGtqopqdbWtdqBytcu5yqw7VwzQbhRHiHkg/PlZY34GGDZKNwrx1eLDdmp9faretY47vvdlU6pafqj+8/pOyYI2194qRi+9UeSq616xiMycEOdpJpZ8h47Kq1kQSVXCRXxFRKoW1JJEichXKSW96HdVQnLUMVeSo466+4WRBFe1rjKnnD8JNCdmbV6hKw7dyuzNSU6z9x+fafE89x48hKcAAAAASUVORK5CYII=";export{A as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA5UExURUdwTACQ/wCa+wCQ/7jG2MjT4L3K27bD1wCR/83Y5LPC1v///wCR/9ff6WXI/7bk/zW5/t3y/gCt/8q0bEUAAAAKdFJOUwBWuuXhVal/fysieA5MAAAAu0lEQVQ4y73V2xLDEBCAYVLEqYj3f9iSTFJhw15o/0vzzYSZWIScKaHrhCJtSkPxFrK0/K6CJE/M1GVZf33V2hiMhGGWTGFgK5/gLlEwS4GCpjiQfNmq6G9yPdxigXwLKeRsbKEEoX2Arix24O2crgN9WehA9B7nw63MzTh1KIt/PUw8G8FrdRrE7JFiIQGdAyDt34QvTFQuIZT/uDcw7N7rX0NwkF7Dhw9G8zmf2XjY71WjFHg+DnY8Ih+MGDjNMAmfOQAAAABJRU5ErkJggg==";export{A as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTABl/gBk/QBa+wBl/gBk/gBj/QBk/gBk/QBk/QBl/QBg/8y67VYAAAAMdFJOUwD+xQp/t0Wa0F3kLUbgIywAAABdSURBVAjXY2BgMDY2ZgABdkFBQVEDIIN1iYtLYTCI0cDAwCIKZTA4OkAZHApQBhMyg3NCGYTBwNDoAGIwp6XNEjUAMjiBBgs6QESShAwgagqry6vAjBagdAEDDAAAQXgP8Z48ljAAAAAASUVORK5CYII=";export{A as default};
|