other
- Location
scripts/run.py:184- Finding
Medical records are transmitted without the promised de-identification
- Content
View full analysis
tuple[str, str]: """构建 LLM 提示词,返回 (part1_prompt, part2_prompt).""" record = payload.get("record") or payload.get("text") or payload.get("content") or "" if not record.strip(): raise ValueError("输入缺少 record 字段") # 第一步:分块 - 将病历分为"患者的情况"和"医生的处理意见" chunk_prompt = """给定下面的病历文本,请抽取出两部分 1.患者的情况 2.医生的处理意见 输入: {} 输出: """.strip().format(record) return chunk_prompt, None ``` The derived medical content is subsequently transmitted two more times: ```python def run( payload: dict[str, Any], *, base: str, model: str, appkey: str, timeout: int ) -> str: """执行复诊病历生成.""" chunk_prompt, _ = build_prompt(payload) # 第一步:分块 chunk_result = call_llm(chunk_prompt, base=base, model=model, appkey=appkey, timeout=timeout) # 提取两部分内容 record1, record2 = extract_chunk_result(chunk_result) # 第二步:分别抽取 part1_prompt, part2_prompt = build_extract_prompts(record1, record2) part1_result = call_llm(part1_prompt, base=base, model=model, appkey=appkey, timeout=timeout) part2_result = call_llm(part2_prompt, base=base, model=model, appkey=appkey, timeout=timeout) ``` There is no redaction stage for names, government identifiers, telephone numbers, addresses, or other identifying information. Consequently, records containing personally identifiable health informat ...[truncated 1118 chars]- Remediation
View remediation
