chb / indivo_server

The Indivo™ Personally Controlled Health Record
http://indivohealth.org
GNU General Public License v3.0
103 stars 40 forks source link

familyName and givenName reversed in sample data #25

Closed Travers closed 12 years ago

Travers commented 12 years ago

The sample data we have has the <familyName> and <givenName> reversed

kristofer commented 12 years ago

Not quite closed. Cloned today and got

Loading data profile patient_967332 for record John S. Smith
    Error loading profile: Input document didn't validate, error was: Element '{http://indivo.org/vocab/xml/documents#}givenName': This element is not expected. Expected is ( {http://indivo.org/vocab/xml/documents#}familyName )., line 8

when I did the "python utils/reset.py" database reset.

p2 commented 12 years ago

Did you perform the git submodule update? Patient sample data is in a different repository.

p2 commented 12 years ago

Oh wait, no, you are correct! My bad.

kristofer commented 12 years ago

so what can I do to the XML file to force it?

p2 commented 12 years ago

I'll push the fix soon, but you can just delete the record node's data_profile attribute from your utils/indivo_data.xml file so it doesn't import any data upon a reset.

p2 commented 12 years ago

Okay, fixed in the https://github.com/chb/indivo_sample_data subrepository, which is now included in https://github.com/chb/indivo_server/commit/21e4f8594962042c8cf3aa7864125fe4d726aec3

kristofer commented 12 years ago

thanks, and what you said to do worked. am running. confused :-), but running!

p2 commented 12 years ago

Very good! :)

The sample data is in its own repository, so when you update indivo_server, the sub-repositories do not automatically update, meaning you would still have the old (faulty) data. Only after you've run said command do you have the latest and greatest. (y)

Travers commented 12 years ago

If you followed Pascal's advice of removing the data_profile attribute before resetting your database, I would recommend adding that back in once you have updated the indivo_sample_data submodule, and running the reset script again. This way you will have some actual data to work with :)