Use shared access for synthetic breast follow-up
This commit is contained in:
@@ -72,6 +72,17 @@ def test_a_scored_member_has_the_contracts_shape(client, seeded):
|
||||
assert [(h["horizonte_anios"], h["probabilidad"], h["estado"]) for h in horizons] == [(1.0, 0.1, "final"), (3.0, 0.3, "final")]
|
||||
|
||||
|
||||
def test_follow_up_identity_resolves_scored_patient(client, seeded):
|
||||
"""The patient selected from follow-up resolves to that patient's seeded risk."""
|
||||
listing = client.get('/cacu/seguimiento?corte=2025-12-31&meses=12&page_size=200').get_json()
|
||||
row = next(item for item in listing['items'] if item['pac_id'] == str(seeded[0]))
|
||||
assert row['id_seudonimo'] == row['pac_id']
|
||||
response = client.get(f"/cacu/pacientes/{row['pac_id']}/riesgo")
|
||||
assert response.status_code == 200
|
||||
assert response.get_json()['cohorte']['pap_0'] == 'ASC-US'
|
||||
assert response.get_json()['riesgo']['horizontes'][0]['probabilidad'] == 0.1
|
||||
|
||||
|
||||
def test_a_member_without_a_confirmed_batch_and_a_non_member(client, seeded):
|
||||
"""Pins down: a member nobody scored has `cohorte` and `riesgo: null`; a patient outside the latest build has both
|
||||
null. Fails if either case errors or invents a risk."""
|
||||
|
||||
Reference in New Issue
Block a user