Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cu 86bzf9c4p update platform je mpi images #324

Merged
merged 6 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
239 changes: 239 additions & 0 deletions client-registry-jempi/config/config-api.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
{
"fields": [
{
"fieldName": "aux_id",
"fieldType": "String",
"fieldLabel": "AUX ID",
"groups": ["identifiers", "record_details"],
"scope": [
"/patient-record/:uid",
"/golden-record/:uid",
"/record-details/:uid",
"/search/custom"
],
"readOnly": true,
"accessLevel": []
},
{
"fieldName": "givenName",
"fieldType": "String",
"fieldLabel": "First Name",
"groups": [
"name",
"demographics",
"filter",
"linked_records",
"record_details"
],
"scope": [
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/simple",
"/search/custom",
"/search-results/golden",
"/search-results/patient",
"/record-details/:uid",
"/browse-records"
],
"validation": {
"required": true,
"onErrorMessage": "The family name cannot be empty"
},
"accessLevel": []
Comment on lines +18 to +42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the validation error message.

The validation error message for givenName should refer to the "first name" instead of the "family name."

-  "onErrorMessage": "The family name cannot be empty"
+  "onErrorMessage": "The first name cannot be empty"
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"fieldName": "givenName",
"fieldType": "String",
"fieldLabel": "First Name",
"groups": [
"name",
"demographics",
"filter",
"linked_records",
"record_details"
],
"scope": [
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/simple",
"/search/custom",
"/search-results/golden",
"/search-results/patient",
"/record-details/:uid",
"/browse-records"
],
"validation": {
"required": true,
"onErrorMessage": "The family name cannot be empty"
},
"accessLevel": []
"fieldName": "givenName",
"fieldType": "String",
"fieldLabel": "First Name",
"groups": [
"name",
"demographics",
"filter",
"linked_records",
"record_details"
],
"scope": [
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/simple",
"/search/custom",
"/search-results/golden",
"/search-results/patient",
"/record-details/:uid",
"/browse-records"
],
"validation": {
"required": true,
"onErrorMessage": "The first name cannot be empty"
},
"accessLevel": []

},
{
"fieldName": "familyName",
"fieldType": "String",
"fieldLabel": "Last Name",
"groups": [
"name",
"demographics",
"filter",
"linked_records",
"record_details"
],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/simple",
"/search/custom",
"/search-results/golden",
"/search-results/patient",
"/browse-records"
],
"validation": {
"required": true,
"onErrorMessage": "The family name cannot be empty"
},
"accessLevel": []
},
{
"fieldName": "gender",
"fieldType": "String",
"fieldLabel": "Gender",
"groups": [
"demographics",
"filter",
"sub_heading",
"linked_records",
"record_details"
],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/custom",
"/browse-records"
],
"validation": {
"required": true,
"regex": "^(male|female)$",
"onErrorMessage": "The Gender cannot be empty and should either be male, female or neutral"
},
"accessLevel": []
Comment on lines +72 to +94
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the regex pattern for gender validation.

The regex pattern should include "neutral" to match the error message.

-  "regex": "^(male|female)$"
+  "regex": "^(male|female|neutral)$"
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"fieldName": "gender",
"fieldType": "String",
"fieldLabel": "Gender",
"groups": [
"demographics",
"filter",
"sub_heading",
"linked_records",
"record_details"
],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/custom",
"/browse-records"
],
"validation": {
"required": true,
"regex": "^(male|female)$",
"onErrorMessage": "The Gender cannot be empty and should either be male, female or neutral"
},
"accessLevel": []
"fieldName": "gender",
"fieldType": "String",
"fieldLabel": "Gender",
"groups": [
"demographics",
"filter",
"sub_heading",
"linked_records",
"record_details"
],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/custom",
"/browse-records"
],
"validation": {
"required": true,
"regex": "^(male|female|neutral)$",
"onErrorMessage": "The Gender cannot be empty and should either be male, female or neutral"
},
"accessLevel": []

},
{
"fieldName": "dob",
"fieldType": "Date",
"fieldLabel": "Date of Birth",
"groups": [
"demographics",
"filter",
"sub_heading",
"linked_records",
"record_details"
],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/simple",
"/search/custom",
"/search-results/golden",
"/search-results/patient",
"/browse-records"
],
"accessLevel": [],
"validation": {
"required": true,
"onErrorMessage": "Date of birth cannot be empty"
}
},
{
"fieldName": "city",
"fieldType": "String",
"fieldLabel": "City",
"groups": ["demographics", "filter", "linked_records", "record_details"],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/custom",
"/browse-records"
],
"accessLevel": [],
"validation": {
"required": true,
"onErrorMessage": "Date of birth cannot be empty"
}
Comment on lines +124 to +139
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the validation error message.

The validation error message for city should refer to the "city" field instead of "Date of birth."

-  "onErrorMessage": "Date of birth cannot be empty"
+  "onErrorMessage": "City cannot be empty"
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"fieldName": "city",
"fieldType": "String",
"fieldLabel": "City",
"groups": ["demographics", "filter", "linked_records", "record_details"],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/custom",
"/browse-records"
],
"accessLevel": [],
"validation": {
"required": true,
"onErrorMessage": "Date of birth cannot be empty"
}
"fieldName": "city",
"fieldType": "String",
"fieldLabel": "City",
"groups": ["demographics", "filter", "linked_records", "record_details"],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/custom",
"/browse-records"
],
"accessLevel": [],
"validation": {
"required": true,
"onErrorMessage": "City cannot be empty"
}

},
{
"fieldName": "phoneNumber",
"fieldType": "String",
"fieldLabel": "Phone No",
"groups": ["demographics", "filter", "linked_records", "record_details"],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/custom",
"/browse-records"
],
"accessLevel": []
Comment on lines +142 to +153
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding validation rules for phone numbers.

The phoneNumber field lacks validation rules. Consider adding a regex pattern to ensure correct formatting.

"validation": {
  "regex": "^[+]?[0-9]{1,15}$",
  "onErrorMessage": "Phone number must be a valid international format"
}

},
{
"fieldName": "nationalId",
"fieldType": "String",
"fieldLabel": "National ID",
"groups": ["identifiers", "linked_records", "record_details"],
"scope": [
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink",
"/search/simple",
"/search/custom",
"/search-results/golden",
"/search-results/patient",
"/browse-records"
],
"accessLevel": [],
"validation": {
"required": true,
"regex": "",
"onErrorMessage": "The national Id cannot be empty"
}
Comment on lines +156 to +175
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider defining a regex pattern for national ID validation.

The nationalId field's validation rule has an empty regex pattern. Consider specifying a pattern for validation.

"regex": "^[A-Z0-9]{5,10}$",
"onErrorMessage": "The national ID must be alphanumeric and between 5 to 10 characters"

}
],
"systemFields": [
{
"fieldName": "recordType",
"fieldType": "String",
"fieldLabel": "Record Type",
"groups": ["none"],
"scope": ["/notifications/match-details", "/record-details/:uid/relink"],
"accessLevel": []
},
{
"fieldName": "uid",
"fieldType": "String",
"fieldLabel": "UID",
"groups": [
"identifiers",
"sub_heading",
"linked_records",
"record_details",
"filter"
],
"scope": [
"/notifications/match-details",
"/record-details/:uid/relink",
"/search-results/golden",
"/search-results/patient",
"/record-details/:uid",
"/browse-records"
],
"accessLevel": []
},
{
"fieldName": "createdAt",
"fieldType": "String",
"fieldLabel": "Created At",
"groups": ["linked_records", "record_details", "audit_trail"],
"scope": ["/record-details/:uid", "/browse-records"],
"accessLevel": []
},
{
"fieldName": "sourceId",
"fieldType": "SourceId",
"fieldLabel": "Source Id",
"groups": ["registering_facility", "linked_records", "record_details"],
"scope": ["/record-details/:uid", "/browse-records"],
"accessLevel": []
},
{
"fieldName": "score",
"fieldType": "Number",
"fieldLabel": "Score",
"groups": ["none", "record_details"],
"scope": [
"/patient-record/:uid",
"/golden-record/:uid",
"/record-details/:uid",
"/notifications/match-details",
"/record-details/:uid/relink"
],
"accessLevel": []
}
]
}
Loading
Loading