Cannot get property 'archetype_node_id' on null object error in openEHR toolKit

how to solve this error

Hey @Maha_Mahmoud,

welcome to the discourse :slight_smile:
I guess the tool your referring is https://toolkit.cabolabs.com/ ?
Thats a tool from cabolabs.
In that case @pablo is the one with the answers.

Hi @Maha_Mahmoud can you please describe your workflow to understand when the problem happens and also share the archetype or template you are using?

Thanks.

When I try to generate canonical xml composition file from template otp file
The same error appeared for these two templates

https://tools.openehr.org/designer/#/viewer/shared/Pz9zaGFyZWRJZD0xJDcxODE0MzQ2YTdhNzQ5MGM5MWI3YzEwM2E0NzljOWQy

https://tools.openehr.org/designer/#/viewer/shared/Pz9zaGFyZWRJZD0xJDM5M2YzMzYyZjViMzRhZDM4MjQ0MzRiODcxMTE3NWFi

Thanks

Hi @Maha_Mahmoud I can’t see the XML. Can you export the OPTs and share the XML files?

Thanks!

insurance.docx (34.6 KB)
patient details.docx (33.6 KB)

1 Like

Hi @Maha_Mahmoud I have extracted the opts from your doc files.

You are using GENERIC_ENTRY which is a class from the integration model. That class is not supported by the instance generator of the openEHR Toolkit. Only classes from the entry model are supported.

I’ll add a check for this to show a more user-friendly error.

Ok, Thanks

Ha Maha,

Just refactor your archetypes as ADMIN_ENTRY or EVALUATION archetypes and it should work. These are the simplest of theEntry classes

1 Like

Ok,I will try that
Thanks

Note the type of entry depends on the semantics of the information you want to model.

If you use GENERIC_ENTRY, it’s because you are importing some legacy data from another system into openEHR and that information might not correspond with any of the openEHR entry types. But if you want to record new information, you need to choose from OBSERVATION, EVALUATION, INSTRUCTION, ACTION or ADMIN_ENTRY types of entries.

All those classes are supported by the instance generator in the openEHR Toolkit.

Related note: we are updating the openEHR Toolkit to also support generating instances for demographic classes. This will be released soon.

1 Like