import groovy.xml.*
import groovy.json.*
class ResParam{
String hisPatientId;
String hisRecordId;
}
def paramConvert(param){
def xmlSlurper = new XmlSlurper()
def resXml = xmlSlurper.parseText(param[1])
assert resXml.head.ErrCode == 0 : "档案查询失败"+resXml.head.ErrMsg
def outputs = JsonOutput.toJson(new ResParam(hisPatientId:resXml.body.Detail.BRJZHM,hisRecordId:resXml.body.Detail.BRDAID))
return outputs
}