let data = {
  departmentChildItem: {},
  arActiveKey: "",
  OTCItem: {}, // 一键拨号
  isAddAdm: false, // 是否重新查询就诊人下拉数据
  isReRenderHead: false, // 是否需要更新header就诊人信息
};

export default function headerRedux(state = data, action) {
  if (action.type === 'departmentChildItem') {
    return {
      ...state,
      departmentChildItem: action.value,
    }
  } else if (action.type === 'arActiveKey') {
    return {
      ...state,
      arActiveKey: action.value,
    }
  } else if (action.type === 'OTCItem') {
    return {
      ...state,
      OTCItem: action.value,
    }
  } else if (action.type === 'isAddAdm') {
    return {
      ...state,
      isAddAdm: action.value,
    }
  } else if (action.type === 'isReRenderHead') {
    return {
      ...state,
      isReRenderHead: action.value,
    }
  } else if (action.type === 'isSelectPatient') { // 是否可以选择就诊人
    return {
      ...state,
      isSelectPatient: action.value,
    }
  } else {
    return state;
  }
}