package org.diagbot.vo.domain;

import java.util.HashMap;
import java.util.Map;

public class DrugsPattern {
    public Map<String,String> bigSubDrugs(String drugs){
        Map<String,String> bigSubMap=new HashMap<>();
        String bigDrugs="" ,subDrugs="";
        if(drugs.contains("(")){
            bigDrugs=drugs.split("\\(")[0];
            subDrugs=drugs.split("\\(")[1].replace(")","");
        }else {
            bigDrugs=drugs;
            subDrugs=drugs;
        }
        bigSubMap.put("big",bigDrugs);
        bigSubMap.put("sub",subDrugs);
        return bigSubMap;
    }
}
