로그인 계열 6종 — 세션 사용자 행을 넓혀 해결. 95종 → 100종 + Dead 1
## 세션 조회 확장(UserContextStore) M_UidMst 행에서 UidLicNum·UidSpcLic 를 더 읽고, 직종명은 레거시 그대로 DtsDtlCod='JOBCOD' 만으로 M_DtsMst 를 조인해(bzDataInterface.vb:17944 — DtsTblCod 조건이 없다) DtsCodNam 을 가져온다. HisUser 에 세 필드 추가. ## 태그 5종 + Dead 1종 - ETC_로그인_의사면허번호(UidLicNum) · 전문의번호(UidSpcLic) · 직종(DtsCodNam) - ETC_로그인_근무부서 = 세션 부서 한글명. 레거시는 개원일(HspStrDte>=20220701)로 DepOfcNam 을 가르지만 개원일 미상 결정에 따라 DepKorNam 갈래다(기존 결정과 동일). - ETC_로그인_근무부서_사용자명 = "부서-이름". 레거시는 UidNam 으로 걸러 동명이인에서 남의 부서가 나올 수 있는데 세션 사용자 행이라 결정적이다(주석 기록). - ETC_로그인_직급 → Dead. 값은 UidNam 을 담고 조건은 UidCod 로 걸어(:17262·17272) 실무상 늘 빈칸이던 태그다. 고치면 없던 값이 갑자기 채워지므로 합의 전까지 레거시 유지. 레거시의 면허·전문의번호 조회는 유효기간 없이 M_DepMst 를 불필요하게 조인해 ORDER BY 없이 첫 행을 집는 비결정 조회였다(조사 문서 risk) — 세션 행(유효기간 검증 완료)에서 읽는 쪽이 결정적이고 값 원천(M_UidMst 같은 행)은 같다. ## 게이트 - dotnet test 338/338 · --edit-smoke 실패 0(이름 검사 100종) - --db-patient 전건 통과 · --db-render P062 md5 불변 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
94bdcc763f
commit
e065c5a645
@@ -68,6 +68,14 @@ public static class TagPreviewCatalog
|
||||
["ETC_로그인_사용자ID_사용자명"] = UserField.IdAndName,
|
||||
["ETC_로그인_사용자연락처"] = UserField.MobilePhone,
|
||||
["ETC_로그인_원내연락처"] = UserField.OfficePhone,
|
||||
// 세션 사용자 행(M_UidMst + 직종 조인)에서 나온다 — 환자 문맥이 필요 없다.
|
||||
// 근무부서는 레거시가 개원일(HspStrDte>=20220701)로 DepOfcNam/DepKorNam 을 가르는데
|
||||
// 개원일은 세션에 없어 빈 값 결정이라 DepKorNam 갈래로 간다(OCM_진료과와 같은 결정).
|
||||
["ETC_로그인_의사면허번호"] = UserField.License,
|
||||
["ETC_로그인_전문의번호"] = UserField.Specialist,
|
||||
["ETC_로그인_직종"] = UserField.Job,
|
||||
["ETC_로그인_근무부서"] = UserField.Department,
|
||||
["ETC_로그인_근무부서_사용자명"] = UserField.DepartmentAndName,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -84,6 +92,11 @@ public static class TagPreviewCatalog
|
||||
// 환자를 골라도 영원히 안 나온다. 사유를 정직하게 하려고 넣는다.
|
||||
["ETC_건강보험증번호_Refer"] = TagPreviewKind.Dead,
|
||||
|
||||
// 값은 UidNam 을 담고 조건은 UidCod 로 건다(bzDataInterface.vb:17262·17272) —
|
||||
// 실무상 0건이라 레거시에서 늘 빈칸이던 태그다. 고치면 없던 값이 갑자기 채워지므로
|
||||
// 출시 전 합의 전까지 레거시 동작(항상 빈 값)을 유지한다.
|
||||
["ETC_로그인_직급"] = TagPreviewKind.Dead,
|
||||
|
||||
// 태그가 아니라 내부 헬퍼 — 우리 카탈로그가 Public Function 을 전수 추출해 섞여 들어왔다.
|
||||
// 레거시 태그 목록(fmDataTag)은 PAT_/OCM_/ETC_ 접두어만 올린다.
|
||||
["퇴원약DT"] = TagPreviewKind.NotATag,
|
||||
@@ -189,6 +202,11 @@ public static class TagPreviewCatalog
|
||||
|
||||
/// <summary>로그인 사용자 정보에서 이 태그의 값을 만든다</summary>
|
||||
public static string FromUser(string tag, string id, string name, string mobile, string office)
|
||||
=> FromUser(tag, id, name, mobile, office, string.Empty, string.Empty, string.Empty, string.Empty);
|
||||
|
||||
/// <summary>로그인 사용자 정보에서 — 면허·전문의·직종·부서까지 받는 본판</summary>
|
||||
public static string FromUser(string tag, string id, string name, string mobile, string office,
|
||||
string license, string specialist, string job, string depName)
|
||||
{
|
||||
if (!UserTags.TryGetValue(tag, out var field))
|
||||
{
|
||||
@@ -203,12 +221,19 @@ public static class TagPreviewCatalog
|
||||
UserField.IdAndName => $"{id}.{name}",
|
||||
UserField.MobilePhone => mobile,
|
||||
UserField.OfficePhone => office,
|
||||
UserField.License => license,
|
||||
UserField.Specialist => specialist,
|
||||
UserField.Job => job,
|
||||
UserField.Department => depName,
|
||||
// 레거시(:17101)는 NVL(DepOfcNam,DepKorNam)||'-'||UidNam — 개원일 미상 결정으로 한글명 고정.
|
||||
// 레거시는 UidNam 으로 걸러 동명이인에서 남의 부서가 나올 수 있는데 여기는 세션 사용자 행이라 결정적이다.
|
||||
UserField.DepartmentAndName => depName.Length > 0 || name.Length > 0 ? $"{depName}-{name}" : string.Empty,
|
||||
_ => string.Empty,
|
||||
};
|
||||
}
|
||||
|
||||
private enum ClockFormat { Date, DateTime, DateTimeMask, DateEnglish, Year, YearSuffixed, Month, Day, Hour, Minute, Time }
|
||||
|
||||
private enum UserField { Name, Id, IdAndName, MobilePhone, OfficePhone }
|
||||
private enum UserField { Name, Id, IdAndName, MobilePhone, OfficePhone, License, Specialist, Job, Department, DepartmentAndName }
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user