Hello!, Currently am working on this ticket here, After configurations done in registrationapp.json as seen below
{ "id": "foobar.registrationapp.registerPatient", "instanceOf": "registrationapp.registerPatient", "label": "Create a new patient", "description": "Create a new Patient Record", "extensions": [ { "id": "foobar.registrationapp.registerPatient.homepageLink", "extensionPointId": "org.openmrs.referenceapplication.homepageLink", "type": "link", "label": "referenceapplication.app.registerPatient.label", "url": "registrationapp/registerPatient.page?appId=foobar.registrationapp.registerPatient", "icon": "icon-user", "order": 1, "requiredPrivilege": "App: registrationapp.registerPatient" }, { "id": "application.registrationapp.summary.editPatientLink", "extensionPointId": "patientDashboard.overallActions", "type": "link", "label": "referenceapplication.app.editRegistrationInfo.label", "url": "registrationapp/registrationSummary.page?patientId={{patient.uuid}}&appId=foobar.registrationapp.registerPatient", "icon": "icon-pencil", "order": 25, "requiredPrivilege": "App: registrationapp.registerPatient" } ], "config": { "afterCreatedUrl": "/coreapps/clinicianfacing/patient.page?patientId={{patientId}}", "sections": [ { "id": "contactInfo", "label": "registrationapp.patient.contactInfo.label", "questions": [ { "legend": "Person.address", "fields": [ { "type": "personAddress", "label": "registrationapp.patient.address.question", "widget": { "providerName": "uicommons", "fragmentId": "field/personAddress" } } ] }, { "id" : "identificationNumber", "legend" : "Number Identifier", "fields" : [ { "type" : "patientIdentifier", "label" : "Identifier", "formFieldName" : "identificationNumber", "uuid" : "PASTE_THE_SAVED_UUID", "widget" : { "providerName" : "uicommons", "fragmentId" : "field/text" } } ] } ] } ] } }
When trying to add an identifier parameter value , an identifier can be saved and reflected on the patient dashboard page but trying to delete identifier value and save an empty identifier field , the system redirects the exact identifier that was saved ,which is a bug ,the system should return empty value on the ui
What i have done so far here is the draft Pr the challenge so fur is that, the object(identifier parameter value ) cannot be persisted to the database , it seem to be reflected and saved on the ui only
Other thought which am still looking into is that this lines
PatientIdentifier identifier = new PatientIdentifier(parameterValue, identifierType, null);
PatientIdentifierValidator.validateIdentifier(identifier);
validates only identifiers , it doesn’t check whether the identifier field is empty or null. The workaround should be able to validate field.getFormFieldName() , in that when the identifier is deleted and identifier field is empty, the system should not return the identifier value or empty string