我有一个多维 JSON 数据集,需要替换多个值,以便我可以将我的应用程序加载到 Web 以进行一些故障排除。这些值需要被替换,因为它们是可以识别个人受保护医疗信息的私人记录。我很讨厌正则表达式,但还不能有效地做到这一点。想要的是替换 () 中描述的以下字段:
PROV_NAME(Drlastname001,Drfirstname001,# 部分递增) PAT_NAME (Patlname0001 , Patfname0001 # 部分递增) PERS_ID、MRN、ENC_ID、FIN、ORD_ID(每个随机数) HOME_PHONE、CELL_PHONE(随机电话号码) CMT_PRSNL (Stflastn0001 , Stffirstn0001 # 部分递增)
以下是手动替换信息的 JSON 数据集示例。我的真实数据集对于大多数数组 [] 都有多个项目。我试图在 Sublime Text 中做到这一点,但我再次对正则表达式感到厌烦。我怎样才能快速做到这一点?PHP,JavaScript,在 Sublime Text 中?
{
"TICKLER_ORDERED": {
"PROVIDER": [
{
"PROV_NAME": "Drlastname001, Drfirstname001",
"PERSON": [
{
"PERS_ID": 234213423,
"PAT_NAME": "Patlname0001 , Patfname0001",
"MRN": "45246",
"HOME_PHONE": "984-435-5673",
"CELL_PHONE": "745-547-6544",
"OLDEST_ORDER": "/Date(2012-01-03T13:34:28.000-04:00)/",
"ENCOUNTERS": [
{
"ENC_ID": 8854774,
"FIN": "78787457",
"ORDERS": [
{
"ORD_ID": 23423413,
"ORD_NAME": "MA Digital Diagnostic Mammo-Bil/CAD",
"ORD_TYPE": "Radiology",
"ORD_STATUS": "Canceled",
"ORD_PRIORITY": "Routine",
"ORD_DATE": "01/03/2012 13:34",
"DUE_DATE": "01/06/2012 13:00",
"COMMENTS": [
{
"CMT_DISP": "This is a test",
"SEQUENCE": "1",
"CMT_DTTM": "02/04/13 11:40",
"CMT_PRSNL": "Stflastn , Stffirstn"
},
{
"CMT_DISP": "This isn't a test",
"SEQUENCE": "2",
"CMT_DTTM": "02/04/13 11:42",
"CMT_PRSNL": "Stflastn0001 , Stffirstn0001"
}
]
},
{
"ORD_ID": 123234235,
"ORD_NAME": "US Breast Bilateral",
"ORD_TYPE": "Radiology",
"ORD_STATUS": "Canceled",
"ORD_PRIORITY": "Routine",
"ORD_DATE": "01/03/2012 13:34",
"DUE_DATE": "01/06/2012 14:20",
"COMMENTS": []
}
]
}
]
}
]
}
]
}
}