|
11 | 11 | # import json |
12 | 12 | import numpy as np |
13 | 13 |
|
14 | | -from nrlf.consumer.fhir.r4.model import DocumentReference |
15 | 14 | from nrlf.core.constants import ( |
16 | 15 | CATEGORY_ATTRIBUTES, |
17 | 16 | SNOMED_SYSTEM_URL, |
18 | 17 | TYPE_ATTRIBUTES, |
19 | 18 | TYPE_CATEGORIES, |
20 | | - Categories, |
21 | | - PointerTypes, |
22 | 19 | ) |
23 | 20 | from nrlf.core.dynamodb.model import DocumentPointer |
24 | 21 | from nrlf.core.logger import logger |
25 | 22 | from nrlf.tests.data import load_document_reference |
| 23 | +from tests.performance.seed_data_constants import ( # DEFAULT_COUNT_DISTRIBUTIONS, |
| 24 | + CHECKSUM_WEIGHTS, |
| 25 | + DEFAULT_CUSTODIAN_DISTRIBUTIONS, |
| 26 | + DEFAULT_TYPE_DISTRIBUTIONS, |
| 27 | +) |
26 | 28 |
|
27 | 29 | dynamodb = boto3.client("dynamodb") |
28 | 30 | resource = boto3.resource("dynamodb") |
|
31 | 33 |
|
32 | 34 | DOC_REF_TEMPLATE = load_document_reference("NFT-template") |
33 | 35 |
|
34 | | -CHECKSUM_WEIGHTS = [i for i in range(10, 1, -1)] |
35 | | - |
36 | | -# These are based on the Nov 7th 2025 pointer stats report |
37 | | -DEFAULT_TYPE_DISTRIBUTIONS = { |
38 | | - "736253002": 65, # mental health crisis plan |
39 | | - "1382601000000107": 5, # respect form |
40 | | - "887701000000100": 15, # emergency healthcare plan |
41 | | - "861421000000109": 5, # eol care coordination summary |
42 | | - "735324008": 5, # treatment escalation plan |
43 | | - "824321000000109": 5, # summary record |
44 | | -} |
45 | | - |
46 | | -DEFAULT_CUSTODIAN_DISTRIBUTIONS = { |
47 | | - "736253002": { |
48 | | - "TRPG": 9, |
49 | | - "TRHA": 1, |
50 | | - "TRRE": 20, |
51 | | - "TRAT": 10, |
52 | | - "TWR4": 4, |
53 | | - "TRKL": 9, |
54 | | - "TRW1": 5, |
55 | | - "TRH5": 1, |
56 | | - "TRP7": 13, |
57 | | - "TRWK": 8, |
58 | | - "TRQY": 3, |
59 | | - "TRV5": 3, |
60 | | - "TRJ8": 2, |
61 | | - "TRXA": 4, |
62 | | - "T11X": 1, |
63 | | - "TG6V": 2, |
64 | | - }, |
65 | | - "1382601000000107": {"T8GX8": 3, "TQUY": 2}, # respect form |
66 | | - "887701000000100": { |
67 | | - "TV1": 1, |
68 | | - "TV2": 2, |
69 | | - "TV3": 1, |
70 | | - "TV4": 1, |
71 | | - "TV5": 3, |
72 | | - "TV6": 1, |
73 | | - }, # emergency healthcare plan |
74 | | - "861421000000109": { |
75 | | - "TV1": 2, |
76 | | - "TV2": 2, |
77 | | - "TV3": 1, |
78 | | - "TV4": 1, |
79 | | - "TV5": 3, |
80 | | - "TV6": 1, |
81 | | - }, # eol care coordination summary |
82 | | - "735324008": { |
83 | | - "TV1": 1, |
84 | | - "TV2": 1, |
85 | | - "TV3": 1, |
86 | | - "TV4": 2, |
87 | | - "TV5": 2, |
88 | | - "TV6": 1, |
89 | | - }, # treatment escalation plan |
90 | | - "824321000000109": { |
91 | | - "TRXT": 1, |
92 | | - }, # summary record currently has only one supplier |
93 | | -} |
94 | | - |
95 | | -DEFAULT_COUNT_DISTRIBUTIONS = {"1": 91, "2": 8, "3": 1} |
96 | | - |
97 | 36 |
|
98 | 37 | class TestNhsNumbersIterator: |
99 | 38 | def __iter__(self): |
@@ -262,7 +201,7 @@ def _get_pointer_count_poisson_distributions( |
262 | 201 |
|
263 | 202 |
|
264 | 203 | def _set_up_custodian_iterators( |
265 | | - custodian_dists: dict[str, dict[str, int]] |
| 204 | + custodian_dists: dict[str, dict[str, int]], |
266 | 205 | ) -> dict[str, Iterator[str]]: |
267 | 206 | custodian_iters: dict[str, Iterator[str]] = {} |
268 | 207 | for pointer_type in custodian_dists: |
|
0 commit comments