I am trying to post the following to create a person...
{
"names": [{"givenName": "Test", "familyName": "Woman"}],
"gender": "F",
"age": 32,
"birthdate": "1980-01-02",
"birthdateEstimated": true,
"dead": true,
"deathDate": "2012-05-05",
"causeOfDeath": "Cancer",
"addresses": [{"preferred":true,"address1": "12 Hauz Khas Village",
"address2": "Hauz Khas", "city": "New Delhi", "postalCode": "110011"}],
"attributes": [{"8d871f2a-c2cc-11de-8d13-0010c6dffd0f":"Married",
"8d871afc-c2cc-11de-8d13-0010c6dffd0f": "Indian"}]
}
There is some problem with the documentation here or probably a bug... So
although *age* is a creatable property according to the documentation, I
cannot create a person with age
The names is nice because we do not have to call the personname resource
and create a name. Though, I wonder why addresses can't be done in the same
way.
Attributes might be a little complex, but shouldn't they be done in a
similar fashion... So, 8d871f2a-c2cc-11de-8d13-0010c6dffd0f is Civil
Status (attribute type) and I'm trying to save the value of Married to
create a new atttribute for that person.
Is there a notion by which we can write/distinguish in the documentation as
to what sub-resources can be created on the fly, while others need to be
created separately and referenced??
---
Regards,
Saptarshi PURKAYASTHA
My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE
_________________________________________
To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to
[email protected] with "SIGNOFF openmrs-devel-l" in the body (not
the subject) of your e-mail.
[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]