import axios from '@utils/ajax';

import { initHistory } from '@store/actions/historyTemplates';
import store from '@store';

export const initItemList = () => {
    let baseList = store.getState();
    // let whichSign = baseList.typeConfig.typeConfig;
    let state = baseList.patInfo.message;
    return (dispatch) => {
        axios.json('/inquiryInfo/hisInquirys',{
            "hospitalId": state.hospitalId, 
            "patientId": state.patientId, 
            // "sign":whichSign
        }).then((res)=>{
            const data =res.data;
            if(data.code == 0){
                dispatch(initHistory(data.data));
            }else{
                console.log(data)
            }
        })
    }
};
