根据处方号获取中医诊断及证型

/// Description:获取处方关联诊断
/// Input:      PrescNo(处方号),DelimStr(返回值分隔符),Type(GX,GC,ZX)
/// Return:     诊断1DelimStr诊断2
/// Version:    V8.3+
/// Provider:   医生站           
/// Debug:      w ##class(PHA.FACE.IN.Com).GetMRDiagnosDesc("O250815000004",",")
ClassMethod GetMRDiagnosDesc(PrescNo, DelimStr, Type = "") As %String
{
	Q:PrescNo="" ""
	s OrdId=$o(^OEORD(0,"PrescNo",PrescNo,""))
	s AdmDr=$p(^OEORD(OrdId),"^",1)
	s MRAdmRowid=$p(^PAADM(AdmDr),"^",61)
	Q:MRAdmRowid="" ""
	s (desc,types)=""
	s mrdisg ="0" f  s mrdisg=$O(^MR(MRAdmRowid,"DIA",mrdisg)) q:mrdisg=""  d
	.s icdcode = $P(^MR(MRAdmRowid,"DIA",mrdisg),"^",1)
	.s icddx = $P(^MRC("ID",icdcode),"^",13)
	.s icddesc = $P(^MRC("ID",icdcode),"^",2)
	.i icddx="N" s desc = $s(desc="":icddesc,1:desc_" "_icddesc)
	.i icddx="Y" s types = $s(types="":icddesc,1:types_" "_icddesc)
	;s MRDiagnosDesc = ##class(web.DHCDocDiagLinkToPrse).GetMRDiagnosDesc(PrescNo, DelimStr, Type)
    q desc_"^"_types
}