Release Note¶
1.0.0¶
Initial release of the Cancer Registry package
1.0.1¶
Patch release. Resolves a server-side crash (StackOverflowError) that prevented records from being saved, and cleans up the program-rule set. No edit-check logic was changed — every check produces the same result it did in 1.0.0; the changes are structural and corrective only.
Fixed - Saving a record could fail with HTTP 500 / java.lang.StackOverflowError¶
Several program-rule conditions were written as long flat boolean chains (a || b || c || …, up to 615 terms). The DHIS2 expression engine evaluates such conditions recursively — one batch of stack frames per operator — so the deepest chains exhausted the JVM thread stack during server-side rule evaluation on save (org.hisp.dhis.lib.expression.eval.Calculator).
The 22 affected conditions were re-parenthesised into balanced expression trees. This reduces evaluation depth from linear to logarithmic (worst case: a 615-term chain went from depth ~615 to ~12) without changing the operands, operators, actions, priorities, or UIDs of any rule.
| Metric | 1.0.0 | 1.0.1 |
|---|---|---|
| Longest flat boolean chain | 615 terms | 1 |
| Max evaluation depth (rewritten rules) | ~615 | 17 |
| Approx. JVM stack frames (worst rule) | ~3,700 | ~72 |
Changed / Removed¶
Program-rule set cleanup. The legacy program-rule set (239 program rules) is removed as part of this release; the corrected rules ship in the 1.0.1 metadata. A ready-to-run delete payload is included (delete_program_rules.json, importStrategy=DELETE). Deleting a program rule cascades to its program-rule actions automatically.
Affected program rules (22 rebalanced)¶
| UID | Program rule |
|---|---|
pPErjbooDVp | CR - Assign the value "+" to Topography Morphology key |
KnAi5ItRorR | CR - Assign the value "-" to Topography Morphology key |
UzlMHkXXZ1i | CR - Assign the value "*" to Topography Morphology key |
IzlGHEV4SZ7 | CR - Check grade |
C52NUGggKhW | CR - Rare basis: check not passed |
PUUhj3Vy6Z9 | CR - Rare Age Topography Morphology |
PYNY6GAbj5k | CR - Assign value 'Hematopoietic, lymphoid tissue: Unspecified types' to morphology group |
kDGhdaT84AF | CR - Morphology family: Anal tumours |
ClGHCk8bAez | CR - Morphology family: Haematopoietic tumours |
PVZAiKL9CXi | CR - Morphology family: NA |
RmqCsfQP1z7 | CR - Morphology family: Skin tumours |
VwlbG6qekZ6 | CR - Morphology family: Stomach tumours |
RVawS91GVI7 | CR - Topography Morphology: MUST - Morphology family 01-11 |
IyIFLIQHrAt | CR - Topography Morphology: MUST - Morphology family 12-20 |
dqJ41cxWpsL | CR - Topography Morphology: MUST - Morphology family 21-28 |
bvJuGgzsPvI | CR - Topography Morphology: MUST - Morphology family 29-44 |
MRwy5x76QDS | CR - Topography Morphology: MUST - Morphology family 45-49 |
qKA56iP1W22 | CR - Topography Morphology: MUST - Morphology family 50-53 |
kLy40xQQlQ5 | CR - Topography Morphology: MUST - Morphology family 54-56 |
lxtvlQAVCC4 | CR - Topography Morphology: MUST - Morphology family 57-59 |
jGhcMVHK7T5 | CR - Topography Morphology: MUST - Morphology family 60-63 |
FHhE9prqA5v | CR - Topography Morphology: MUST NOT |
Notes & recommendations¶
- Backward compatibility: edit-check behaviour is unchanged; existing records and reports are unaffected by the rebalancing.
- Operational backstop: consider raising the DHIS2 Tomcat thread stack (e.g.
-Xss4m) so future long-chain conditions have headroom.
1.0.2¶
Patch release. Aligns the edit checks with CanReg5 (R45): the Multiple primary check is redesigned, five program-rule bugs are fixed, and the metadata left unused by the old Multiple primary design is removed.
Fixed¶
- Multiple primary check gave wrong results. The old rules matched morphology groups as substrings (
d2:contains, so1also matched11..17) and used the literals'01'..'09'while the morphology groups are coded1..9. Several rules could also assign different results to the same data element, so the server rejected the event (E1307). The check is redesigned to apply the CanReg5 pairwise logic (DefaultMultiplePrimaryTester) to every previous tumour of the patient (see "Changed"). - Placenta tumours could not be saved. The option set
CR - Topography Group(Ikrau9hL9yu) had no option58(Placenta), so the server rejected every tumour with topography C58 (E1125). Option58(STa66JD3D8Z) is added. - Myeloid morphology group.
CR - Assign value 'Hematopoietic, lymphoid tissue: Myeloid' to morphology group(QB0YvxpUpVo) used>= 9950instead of== 9950. Morphologies 9960, 9968, 9971, 9975, 9989, 9991, 9992 and 9993 received two morphology groups (8 and 14) and the server rejected the event (E1307). - Tumour-number checks.
CR - Show error if same tumor number already selected more than once(lYRmZf0Nh8B) andCR - Show error if the tumor number has not been assigned to any tumor(hM9x7ElKBnP) now used2:containsItemsinstead ofd2:contains, which matched substrings of other tumour numbers. - "Mandatory variables missing" shown too early.
CR - Can't run the checks if all mandatory element has not values(A3yx7MZpZl5) now applies only when "Run checks" is ticked.
Changed¶
- Multiple primary check (CanReg5 pairwise logic).
- New data element
CR - Previous tumours (morphology-topography)(ZULyGTytzB9, LONG_TEXT, hidden section "Multiple primary tester" of the Tumor stage). It stores the morphology group and topography group of each previous tumour. - New program-rule variables
CR_PREVIOUS_TUMOURS_MT(XbqOaJEBpKZ) andCR_PREVIOUS_TUMOURS_MT_PREVIOUS(CUyBEgdTmT4). - Four rules build the list of previous tumours (
hMxrwRCN4YW,CxmWn6fmMlp,rhTWS9HOMvW,eyTfW7fI59Y). - Three mutually exclusive rules assign the result:
Duplicate primary(MYSJHjfeYBM),Unknown topography(ep5e6gW74ns),Multiple primary(dq7IJt2eOsM). A duplicate with any previous tumour takes precedence. CR - Show 'Run Multiple primary check' element(LYhiFPCNuNL) andCR - Run Multiple primary check is mandatory(MDBtZXkgyI5) now use the new list.- Morphology codes without a CanReg5 group. New rule
CR - Assign value 'Invalid' (0) to morphology group(mBpnwoN0yfZ) assigns group0to 8023, 8085, 8086, 8163, 8256, 8257, 8339, 8348, 8349, 8552, 8563, 8714, 8992, 9045, 9126, 9137 and 9138. A comparison involving such a tumour returnsUnknown topography(CanReg5 returns "Invalid"), as described in the System Design Guide. - Grade of non-malignant tumours. New rule
CR - Assign grade 9 (not applicable) to non-malignant tumours without grade(BG6qQOAodwk) for behaviour 0-2, so the Grade check gives the CanReg5 result.
Removed¶
Metadata of the old Multiple primary design, no longer used by any rule, stage or app (the Cancer Registry export app does not read these fields):
- 20 program rules:
AAGfcPCMI28,bYBpXPSgXGb,BcwDg1BY0Oh,ibUNghwCQnC,HSjNLdsCl2p,QJIMRXoFxK1,QnWENyq6pwn,rjCxaAmE5Ig,pvaIIN2g1GT,uYw2RKTBJHm,XQcLoFel3L1,RwSDx5Q9kCd(old Multiple primary result rules) andNZsJDtDU7RA,VL9d2zV45Cu,UNXBUkJrkHW,aAbTXZ0sIFo,OI2vrwsUy6l,BCrGiEPPFza,N4B9wrZPu23,sJc43IT8fj8(old lists of previous groups). - 10 program-rule variables:
CR_MORPHOLOGY_RESULT,CR_PREVIOUS_MORPHOLOGY_GROUP,CR_PREVIOUS_MORPHOLOGY_GROUP_PREVIOUS,CR_MORPHOLOGY_GROUP_MULTIPLE,CR_MORPHOLOGY_GROUP_MULTIPLE_PREVIOUS,CR_PREVIOUS_TOPOGRAPHY_GROUP,CR_PREVIOUS_TOPOGRAPHY_GROUP_PREVIOUS,CR_TOPOGRAPHY_GROUP_MULTIPLE,CR_TOPOGRAPHY_GROUP_MULTIPLE_PREVIOUS, andCR_SITE_NUMBER(unused since 1.0.0). - 5 data elements:
CR - Morphology result(n4IHuWceDlW),CR - Previous morphology group(eGWudq2aGpY),CR - Previous morphology group (multiple)(dTbQZsduHT7),CR - Previous topography group(FyzoZsxRjjz),CR - Previous topography group (multiple)(IhLiguJKuzz). - Option set
CR - Morphology result(fhLbYGj5iW4) and its 4 options.
Result: 228 program rules, 42 program-rule variables, 43 data elements, 16 option sets.