Skip to content

Commit e10ccc6

Browse files
chg ! push to hope core
1 parent 91295da commit e10ccc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1816
-2682
lines changed

src/country_workspace/admin/serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from country_workspace.admin.base import BaseModelAdmin
2-
from country_workspace.models.serializer import DataSerializer
2+
from country_workspace.models import DataSerializer
33
from django.contrib import admin
44

55

src/country_workspace/contrib/hope/constants.py

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -14,67 +14,5 @@
1414
ACCOUNT_FIELDSET_NAME: Final[str] = "HOPE Account"
1515
DOCUMENT_FIELDSET_NAME: Final[str] = "HOPE Document"
1616

17-
# Updated document types to match HOPE Core API
18-
DOCUMENT_TYPES = ("national_id", "national_passport", "birth_certificate", "other")
19-
20-
# Updated account types to match HOPE Core API
21-
ACCOUNT_TYPES = ("mobile", "bank", "cash", "other")
22-
23-
# Field mappings for HOPE Core API transformation
24-
INDIVIDUAL_FIELD_MAPPINGS = {
25-
"given_name": "first_name",
26-
"family_name": "last_name",
27-
"birth_date": "birth_date",
28-
"marital_status": "marital_status",
29-
"observed_disability": "observed_disability",
30-
"relationship": "relationship",
31-
"gender": "gender",
32-
"residence_status": "residence_status",
33-
"consent_sharing": "consent_sharing",
34-
"phone_no": "phone_no",
35-
"phone_no_alternative": "phone_no_alternative",
36-
"country": "country",
37-
"country_origin": "country_origin",
38-
"village": "village",
39-
}
40-
41-
# Required fields for individual data
42-
INDIVIDUAL_REQUIRED_FIELDS = {
43-
"first_name": "",
44-
"last_name": "",
45-
"birth_date": None, # This must be provided
46-
"marital_status": "",
47-
"observed_disability": "",
48-
}
49-
50-
HOUSEHOLD_FIELD_MAPPINGS = {
51-
"household_size": "size",
52-
"village": "village",
53-
"consent_sharing": "consent_sharing",
54-
"country": "country",
55-
"country_origin": "country_origin",
56-
}
57-
58-
# Administrative area field mappings
59-
ADMIN_AREA_MAPPINGS = {
60-
"admin1": "admin1",
61-
"admin2": "admin2",
62-
"admin3": "admin3",
63-
"admin4": "admin4",
64-
}
65-
66-
# Document type validation mapping
67-
DOCUMENT_TYPE_MAPPING = {
68-
"national_id": "national_id",
69-
"national_passport": "national_passport",
70-
"birth_certificate": "birth_certificate",
71-
"other": "other",
72-
}
73-
74-
# Account type validation mapping
75-
ACCOUNT_TYPE_MAPPING = {
76-
"mobile": "mobile",
77-
"bank": "bank",
78-
"cash": "cash",
79-
"other": "other",
80-
}
17+
DOCUMENT_TYPES = ("national_id", "national_passport")
18+
ACCOUNT_TYPES = ("mobile", "bank")

0 commit comments

Comments
 (0)