package com.yihu.hos.crawler.storage;


import com.yihu.hos.crawler.format.IDataTransformer;
import com.yihu.hos.crawler.model.patient.Patient;

import java.util.Map;

/**
 * 存储接口，应该只关心存取
 * 目前定义接口存在如下问题需修订：
 * 1.无取接口
 * 2.toFile超出职责范围
 *
 * @author Airhead
 * @version 1.0
 * @created 22-5-2015 11:24:26
 */
public interface IDataStorage {
    boolean save(IDataTransformer dataTransformer);

    boolean toFile(Patient patient);

    String getDataSet(Patient patient, String dataSetCode);

    String getArchive(String dataSetCode, Map<String, Object> params);

    Boolean isStored(String orgCode, String patientID, String eventNo);


    enum StorageType {
        MYSQL_DB,
        MONGODB,
        FILE_SYSTEM
    }
}