123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- import { SELECT_DRUG, SET_TREAT_INFO, SET_OTHER_DRUG, SET_DRUG_INFO, CLEAR_DRUG_INFO,SHOW_TREAT, HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO, SET_GENERAL_TREAT, SET_TREATMENT, SET_SURGERY_TREAT, SET_RECOMMEND_BASIC, SET_DRUG_INFO_LIST,IS_FIRST_MAIN_DIAG,CLEAR_FIRST_MAIN_DIAG } from '../types/treat'
- import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic, setDrugInfoList, isFirstMainDiag,clearFirstMainDiag } from '../actions/treat'
- const initState = {
- show: false, //治疗方案显示隐藏
- showDrugInfo: false, //药品信息显示隐藏
- isFirstMainDiag: true, //是否为第一次主诊断开单
- generalTreat: '',
- surgeryTreat: '',
- treatment: [],
- // treatment:[
- // {
- // id:1,
- // name:"支气管扩张剂",
- // hasInstroduce:true,
- // drugs:[
- // {
- // id:2,
- // name:"多索茶碱",
- // rate:"50%",
- // isShow:"1", //1展示,0不展示
- // forbidden:"0:正常,1:慎用,2:禁忌",
- // hasInstroduce:true,
- // selected: false
- // },
- // {
- // id:3,
- // name:"二羟丙茶碱",
- // rate:"50%",
- // isShow:"0",
- // forbidden:"0:正常,1:慎用,2:禁忌",
- // hasInstroduce:false,
- // selected: false
- // },
- // {
- // id:4,
- // name:"二羟丙茶碱11",
- // rate:"50%",
- // isShow:"1",
- // forbidden:"0:正常,1:慎用,2:禁忌",
- // hasInstroduce:false,
- // selected: false
- // }
- // ]
- // },
- // {
- // id:5,
- // name:"支气管扩张剂2",
- // hasInstroduce:true,
- // drugs:[
- // {
- // id:6,
- // name:"多索茶碱2",
- // rate:"50%",
- // isShow:"1", //1展示,0不展示
- // forbidden:"0:正常,1:慎用,2:禁忌",
- // hasInstroduce:false,
- // selected: false
- // },
- // {
- // id:7,
- // name:"二羟丙茶碱2",
- // rate:"50%",
- // isShow:"0",
- // forbidden:"0:正常,1:慎用,2:禁忌",
- // hasInstroduce:true,
- // selected: false
- // }
- // ]
- // }
- // ],
- lastTreat: {
- commonDisMedica: [
- {
- medicitionName: '泮托拉唑',
- id: 145
- },
- {
- medicitionName: '奥美拉唑',
- id: 341
- }
- ],
- chronicDisMedica: [
- {
- medicitionName: '兰索拉唑',
- id: 342
- },
- {
- medicitionName: '山莨菪碱',
- id: 344
- }
- ],
- },
- adversReactionList:[
- {
- id: 40772,
- name: '低血糖反应',
- tagName: '低血糖反应',
- showInfo: '0',
- controlType: 2,
- details: [
- {
- name: "无",
- value: 0
- },
- {
- name: "偶尔",
- value: 0
- },
- {
- name: "频",
- value: 0
- }
- ]
- },
- {
- id: 40773,
- name: '胃肠道不良反应',
- tagName: '胃肠道不良反应',
- showInfo: '0',
- controlType: 2,
- details: [
- {
- name: "腹胀 ",
- value: 0
- },
- {
- name: "厌食",
- value: 0
- },
- {
- name: "嗳气",
- value: 0
- },
- {
- name: "恶心",
- value: 0
- },
- {
- name: "呕吐",
- value: 0
- }
- ]
- }
- ],
- treatDesc:{
- title: '药品推荐',
- }
- }
- // const initTreat = {
- // show:false,
- // drugTreat:[
- // {
- // type:'支气管扩张剂',
- // druglist:{
- // common:[
- // {
- // name: '多索茶碱',
- // rate: '80%',
- // desc: ['这是多索茶碱'],
- // select: false,
- // },
- // {
- // name: '二羟丙茶碱',
- // rate: '60%',
- // desc: ['这是二羟丙茶碱'],
- // select: false,
- // }
- // ],
- // basic: [
- // '注意休息,进食富有营养及维生素的流质或半流质食物',
- // '发热病人注意体液的补充,预防脱水',
- // ' 有发绀或低氧血症时,应吸入氧气'
- // ],
- // otherRecommend: [
- // {
- // type: '化痰药(粘液溶解药)',
- // drugList: [
- // {
- // name: '氨溴索',
- // rate: '80%'
- // }
- // ]
- // },
- // {
- // type: '糖皮质激素类',
- // drugList: [
- // {
- // name: '甲泼尼龙',
- // rate: '80%'
- // }
- // ]
- // },
- // {
- // type: '抗胃酸药(质子泵抑制剂)',
- // drugList: [
- // {
- // name: '泮托拉唑',
- // rate: '80%'
- // }
- // ]
- // }
- // ]
- // }
- // },
- // {
- // type:'抗生素类(喹诺酮类!)',
- // druglist:{
- // common:[
- // {
- // name: '左氧氟沙星',
- // rate: '80%',
- // desc: '',
- // select: false
- // },
- // {
- // name: '莫西沙星',
- // rate: '60%',
- // desc: '',
- // select: false
- // }
- // ],
- // basic: [
- // ],
- // otherRecommend: [
-
- // ]
- // }
- // }],
- // treatDesc:{
- // title: '',
- // basic:[],
- // otherRecommend: [],
- // drugDesc:[],
- // }
- // }
- export default function(state=initState, action){
- switch(action.type) {
- case SELECT_DRUG:
- return selectDrug(state, action);
- case SET_OTHER_DRUG:
- return setOtherDrug(state, action);
- case SET_DRUG_INFO:
- return setDrugInfo(state, action);
- case SHOW_TREAT:
- return showTreat(state, action);
- case HIDE_TREAT:
- return hideTreat(state, action);
- case CLEAR_TREAT:
- return clearTreat(state, action);
- case SET_TREATMENT:
- return setTreatment(state, action);
- case SET_GENERAL_TREAT:
- return setGeneralTreat(state, action);
- case SET_SURGERY_TREAT:
- return setSurgeryTreat(state, action);
- case SET_RECOMMEND_BASIC:
- return setRecommendBasic(state, action);
- case SHOW_DRUG_INFO:
- return showDrugInfo(state, action);
- case HIDE_DRUG_INFO:
- return hideDrugInfo(state, action);
- case SET_TREAT_INFO:
- return setTreatInfo(state, action);
- case CLEAR_DRUG_INFO:
- return clearDrugInfo(state, action);
- case SET_DRUG_INFO_LIST:
- return setDrugInfoList(state, action);
- case IS_FIRST_MAIN_DIAG:
- return isFirstMainDiag(state, action)
- case CLEAR_FIRST_MAIN_DIAG:
- return clearFirstMainDiag(state, action)
- default:
- return state
- }
- }
|