If I’m using this twice, it gives me a Specified party has already an EHR set (partyId=cdde0910-561b-4da2-b6ff-ae703e92105a) which is, i guess, because I did not change the idins01. But what exactly is this id? Do I have to change it for every new EHR? Furthermore, I have data for different purposes like testing, training, … What is the right place to encode this information. Namespace?
Yes - the external_ref is the real-world identifier for this patient e.g a hospital number or a national ID like the NHS Number.
Remember the the EHR in openEHR is the root container for a single patient, so you are essentially creating that root container for patient with external identifier value = ‘99999999901’ and labelling scheme with some sort of namespace
To answer your other question re Testing / training etc.
Typically define a few 'known dummy patients (and that means an EHR object of each patient) for testing and training, or safer, have whole different CDR domains for this purpose. We use Postman collections and different postman environments to quickly jump between different CDR instances and CDR products.
Hi @ian.mcnicoll - thank you so much for your detailed reply! This has helped me a lot.
I have one more question about this. Let’s say I want to initially assign groups to my EHRs at creation without a separate CDR, which I can include in later queries. Is it possible to set the namespace without an external ID?