Unable to find phone and email on patient model

Hi All, I have started working on the issue [MF-801] Edit patient details action does not update patient details (Contact details) - OpenMRS Issues. I found out the cause behind this but I am unable to find any field in Patient model to which i will map email and phone.

Oh sorry! Have you tried creating a patient instead?

Take a look at this: Person Attribute vs. Observation - Documentation - OpenMRS Wiki

Yes, I have tried at the create also. While creating a patient at that time also its not saving contact details

@dkayiwa Thanks for this information! I am digging deep into the UI code, If i map mobilenumber and email to attribute then in PersonAttribute model through which fields do i have to map the string. Like I am getting that in values i have to map the value, but how to map number and email as string. In which field should i map, which will distinguish that it is email and the other is phone?

@yash1201 the best way to be helped is by sharing a commit link or Pull request if you’re working on a Ticket .can you share the link to your work ?

I haven’t created a PR yet. I am trying to figure out the fix first. All code is in my local only. I am working on this ticket [MF-801] Edit patient details action does not update patient details (Contact details) - OpenMRS Issues

@yash1201 your github link not Jira…

you need to read through these again

https://wiki.openmrs.org/display/docs/Copy+of+Getting+Started+as+a+Developer

https://wiki.openmrs.org/display/docs/Using+Git

https://wiki.openmrs.org/display/docs/Pull+Request+Tips

You’ll be happy when you master these , before you do anywork. :blush: :blush: :blush:

and finally OpenMRS Frontend 3.0 Documentation for Developers

@tendomart Yes, sure. I will go through all these links! Thanks :slight_smile:

OMRS *Attribute types work like this:

  • Each attribute has an associated *AttributeType class, which determines the way the attribute is processed.
  • The attribute value is stored in an *AttributeType-specific format in the value field.

So in this case, you need both an email attribute type and a phone number attribute type. You then create a PersonAttribute with the type set to the email attribute type and set the value to the email and ditto for the phone number.