PersonAttribute ANDROID CLIENT

We did add New attributes in the web, in MyRegisterPatient:

> {
>         "id": "referenceapplication.registrationapp.myRegisterPat",
>         "instanceOf": "registrationapp.registerPatient",
>         "label": "My Register Patient",
>         "description": "Create MY new Patient Record",
>         "extensions": [
>             {
>                 "id": "referenceapplication.registrationapp.myRegisterPat.homepageLink",
>                 "extensionPointId": "org.openmrs.referenceapplication.homepageLink",
>                 "type": "link",
>                 "label": "My Register Patient",
>                 "url": "registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.myRegisterPat",
>                 "icon": "icon-user",
>                 "order": 1,
>                 "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"
>                                     }
>                                 }
>                             ]
>                         },
>                         {
>                             "legend": "registrationapp.patient.phone.label",
>                             "id": "phoneNumberLabel",
>                             "fields": [
>                                 {
>                                     "type": "personAttribute",
>                                     "label": "registrationapp.patient.phone.question",
>                                     "formFieldName": "phoneNumber",
>                                     "uuid": "14d4f066-15f5-102d-96e4-000c29c2a5d7",
>                                     "widget": {
>                                         "providerName": "uicommons",
>                                         "fragmentId": "field/text"
>                                     },
>                                     "cssClasses": ["phone"]
>                                 }
>                             ]
>                         }
> 					]
> 				},
> 				{
> 					"id": "AdditionalQuestions",
> 					"label": "Additional Questions",
> 					"questions": [{
> 							"legend": "Water Supply",
> 							"fields": [
> 								{
> 									"type": "personAttribute",
> 									"label": "Water Supply",
> 									"formFieldName": "waterSupply",
> 									"uuid": "11a3fd82-156b-45fe-8e1a-4e7781d42c9a",
> 									"widget": {
> 										"providerName": "uicommons",
> 										"fragmentId": "field/text"
> 									}
> 							
> 								}
> 							]
> 					}, 
> 						{
> 							"legend": "Electricity Supply",
> 							"fields": [
> 								{
> 							"type": "personAttribute",
> 							"label": "Electricity Supply",
> 							"formFieldName": "electricitySupply",
> 							"uuid": "fcb7f100-ccd0-4af5-beb7-487e7bd3c7e3",
> 							"widget": {
> 								"providerName": "uicommons",
> 								"fragmentId": "field/text"
> 							}
> 								}
> 							]
> 						}
> 					]
> 					
> 				
>                }
> 			   ]
>             
>         }
>     }

We do NOT know how to change the AndroidPatientFragment in order to set those new attributes created in the server. Also we would like to know how to Show those new Attributes in the

http://localhost:8081/openmrs-standalone/coreapps/clinicianfacing/patient.page?patientId=…”

HELP please

Are you working on this exact module? https://github.com/openmrs/openmrs-contrib-android-client

Yes, we do.

@avijitghosh82 do you have any response to the above? :slight_smile:

Have you checked the PersonAttribute model class? The PersonAttributes can be shown as texts since the information is already captured in the model class. You might want to modify the Presenter to add in the logic of putting in PersonAttributes after similarly editing the layout file.

Finally we will do it using XFORMS (JSON) but when we create a custom JSON with our own CONCEPTS we can not see the formulary in the web. Any advice ?