Case-code registry
src/kr2akn/registries/case_codes.v1.json is the case-number code (사건부호)
registry used by the 43-bit header.
Source
- Seoul Central District Court, 사건부호 안내: https://seoul.scourt.go.kr/common/util/sagubun_all.jsp
- Fetched: 2026-10-29 (324 rows, EUC-KR)
- Registry entries: 345 (the extra 21 are 헌법재판소 and older codes that are not on the Seoul page but are retained for compatibility)
Only the Korean 사건부호 (가단, 가합, 카합, 헌마, ...) is stored.
The court's three-digit code and the law.go.kr six-digit case-type codes are
deliberately not stored:
- the three-digit code does not cover Constitutional Court cases and does not fit the 9-bit header field;
- the law.go.kr code is a case-level type, not a prefix code.
Schema
{
"version": "case_codes.v1",
"frozen": true,
"source": {
"url": "https://seoul.scourt.go.kr/common/util/sagubun_all.jsp",
"fetched": "2026-10-29",
"row_count": 324
},
"codes": [
{
"id": 0,
"code": "가단",
"name": "민사1심단독사건",
"searchable": true
}
]
}
id— dense 9-bit ordinal (0–344) assigned in the published list order. It is the value packed into the 43-bit header.code— the Korean 사건부호. This is the authoritative key.name— the court's 사건명 (human-readable metadata).searchable— whether the court exposes the case in its search (○/X).
ID allocation
The initial 345 codes receive dense IDs 0..344 in the published list order.
The 21 codes not on the Seoul page (헌법 and older codes) are appended at the
end.
After the freeze:
- Existing IDs are never renumbered.
- A new code receives the next unused ID (
345,346, ...). - A code removed from the source list keeps its ID but may be marked
"retired": true; IDs are never reused. - Do not derive meaning from the numeric value.
caseCodeis an opaque wire key; the Koreancodeis the meaning.
CaseCodeRegistry.resolve(code) looks up the Korean code directly. The
registry is a flat map, not a category/index composition.
AKN representation
At the AKN level the full case number is a string:
<FRBRnumber value="2025다217842"/>
<FRBRalias name="caseNo" value="2025다217842"/>
<header><p>2025다217842</p></header>
The Korean prefix (다) is embedded in that string. It is also exposed for
convenience in the Korean extension:
<kr:caseHeader caseNo="2025다217842"
caseCode="38"
caseCodeRaw="다"
.../>
caseCode— the 9-bit registry ID used bycaseId43.caseCodeRaw— the Korean prefix from the case number.caseId43—court_id(7) | year(7) | caseCode(9) | serial(20).
There is no AKN-standard element for the prefix; FRBRnumber is the
authoritative identity.
Refreshing
- Fetch the Seoul page as EUC-KR.
- Parse the
table.tblGrayrows (코드, 사건부호, 사건유형, 사건명, 사건검색제공). - For each row:
- if the Korean code exists, keep its
idand updatename/searchable; - otherwise assign the next unused ID and append it.
- if the Korean code exists, keep its
- Update
source.fetchedandsource.row_count. - Run
validate_registry_data()and the test suite.
The registry is frozen, so a refresh may only append new codes and correct metadata; existing IDs must not move.