0

我有以下代码,我试图想办法让它像下面一样工作:string1 包含所有 CPt 代码的数量,而 String 将包含它的所有详细信息。我尝试使用 GetToken 功能,但我仍然想知道我在这里缺少什么

<cfset string = "CPT Codes= 20101 : EXPLORE WOUND CHEST - 06/25/2013,CPT Codes= 20150 : EXCISE EPIPHYSEAL BAR - 06/25/2013,CPT Codes= 2019F : DILATED MACULAR EXAM DONE - 06/25/2013 ">

我怎样才能再次消退它以使其像这样工作:

<cfset string1 = "20101,20150,2019f">
<cfset string2 = "EXPLORE WOUND CHEST - 06/25/2013,EXCISE EPIPHYSEAL BAR - 06/25/2013,DILATED MACULAR EXAM DONE - 06/25/2013"> 
4

1 回答 1

1

我解决了,任何需要此类信息的人都可以这样做:

<cfset string = "CPT Codes= 20101 : EXPLORE WOUND CHEST - 06/25/2013,CPT Codes= 20150 : EXCISE EPIPHYSEAL BAR - 06/25/2013,CPT Codes= 2019F : DILATED MACULAR EXAM DONE - 06/25/2013 ">
<cfset delimis = "=,:">
<cfset generateLst = ''>
<cfset generateTextlst = ''>
<cfloop list="#string#" index="k">
    <cfset getString = GetToken(k,1,delimis)>
    <cfset getID = GetToken(k,2,delimis)>
    <cfset generateLst = ListAppend(generateLst,getID)>
    <cfset getText = GetToken(k,3,delimis)>
    <cfset generateTextlst = ListAppend(generateTextlst,getText)>        
</cfloop>
<cfdump var="#generateLst#" label="ID Input">
<cfdump var="#generateTextlst#" label="Text Input">
于 2013-07-16T12:59:43.970 回答