package com.lantone.qc.kernel.catalogue.yiwu.firstpagerecord;

import com.lantone.qc.kernel.catalogue.QCCatalogue;
import com.lantone.qc.pub.model.InputInfo;
import com.lantone.qc.pub.model.OutputInfo;
import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
import org.springframework.stereotype.Component;

/**
 * @ClassName : FIRP0525
 * @Description :缺少病案首页
 * @Author : 楼辉荣
 * @Date: 2020-03-06 17:28
 */
@Component
public class FIRP0525 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
        if(medicalRecordInfoDoc == null){
            return;
        }
        if(medicalRecordInfoDoc.getStructureMap().get("isPlacefile").equals("0")){
            return;
        }
        FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
        if(firstPageRecordDoc == null){
            status.set("-1");
        }
    }
}