package com.lantone.qc.trans.taizhou;

import com.google.common.collect.Lists;
import com.lantone.qc.pub.model.doc.NursingSystemDoc;
import com.lantone.qc.pub.model.vo.MedrecVo;
import com.lantone.qc.trans.ModelDocTrans;
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
import com.lantone.qc.trans.taizhou.util.TzXmlUtil;

import java.util.List;
import java.util.Map;

/**
 * @Description: 分级护理制度文档生成
 * @author: rengb
 * @time: 2020/3/17 13:26
 */
public class TaiZhouNursingSystemDocTrans extends ModelDocTrans {

    @Override
    public NursingSystemDoc extract(MedrecVo medrecVo) {
        String content = ((List<String>) medrecVo.getContent().get("content")).get(0);

        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(TzXmlUtil.getXmlToMapForTZ(content), keyContrasts);

        NursingSystemDoc nursingSystemDoc = new NursingSystemDoc();
        nursingSystemDoc.setStructureMap(structureMap);

        return nursingSystemDoc;
    }

    private List<String> keyContrasts = Lists.newArrayList();

}