I am seeking for help in showing atributes to dashboard. i am not a pro programmer.
i dont konw what values should i type in lines: legend, type, label, formfieldname.
i added this code to the registrationapp in sections to collect more information at the registration page. it worked. but i dont see the information in the patient dashboard. i even expanded the contact info link, nothing. PLZZZZZ HELP.
i added the fields: Empresa, Nacionalidade, Grupo sanguíneo, profissão,
{
“id”: “referenceapplication.registrationapp.myRegisterPat”,
“instanceOf”: “registrationapp.registerPatient”,
“label”: “Cadastrar Paciente”,
“description”: “Criar uma ficha para paciente”,
“extensions”: [
{
“id”: “referenceapplication.registrationapp.registerPatient.homepageLink”,
“extensionPointId”: “org.openmrs.referenceapplication.homepageLink”,
“type”: “link”,
“label”: “referenceapplication.app.registerPatient.label”,
“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”: “Empresa/Particular”,
“id”: “myPersonAttributeLabel”,
“fields”: [
{
“type”: “personAttribute”,
“label”: “Empresa/Particular”,
“formFieldName”: “mothersName”,
“uuid”: “ef559b42-d1e9-49a5-b2d2-cf37306e0f26”,
“widget”: {
“providerName”: “uicommons”,
“fragmentId”: “field/text”
},
“cssClasses”: [“mothersName”,“required”]
}
]
},
{
“legend”: “Nacionalidade”,
“id”: “myPersonAttributeLabel”,
“fields”: [
{
“type”: “personAttribute”,
“label”: “Nacionalidade do paciente”,
“formFieldName”: “mothersName”,
“uuid”: “c79d34f4-58d4-4d23-b5f4-12b30365eab3”,
“widget”: {
“providerName”: “uicommons”,
“fragmentId”: “field/text”
},
“cssClasses”: [“mothersName”,“required”]
}
]
},
{
“legend”: “Profissão”,
“id”: “myPersonAttributeLabel”,
“fields”: [
{
“type”: “personAttribute”,
“label”: “Profissão do paciente”,
“formFieldName”: “mothersName”,
“uuid”: “267746cb-f3ea-49a1-9744-18605410aaeb”,
“widget”: {
“providerName”: “uicommons”,
“fragmentId”: “field/text”
},
“cssClasses”: [“mothersName”,“required”]
}
]
},
{
“legend”: “Grupo sanguineo”,
“id”: “myPersonAttributeLabel”,
“fields”: [
{
“type”: “personAttribute”,
“label”: “Grupo sanguineo do paciente”,
“formFieldName”: “mothersName”,
“uuid”: “c29cbfbf-3a89-457c-8908-2b8274fa06af”,
“widget”: {
“providerName”: “uicommons”,
“fragmentId”: “field/text”
},
“cssClasses”: [“mothersName”,“required”]
}
]
},
{
"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": "relationships-info",
"label": "registrationapp.person.relationship",
"questions": [
{
"legend": "registrationapp.person.relationship.label",
"header": "registrationapp.person.relationship.question",
"fields": [
{
"type": "personRelationships",
"widget": {
"providerName": "registrationapp",
"fragmentId": "field/personRelationship"
}
}
]
}
]
}
]
}
}