How to create EHR?

I tried posting data from EHR API openEHR specs
{
“archetype_node_id”: “openEHR-EHR-EHR_STATUS.generic.v1”,
“name”: {
“value”: “EHR status”
},
“uid”: {
“_type”: “OBJECT_VERSION_ID”,
“value”: “8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1”
},
“subject”: {
“_type”: “PARTY_SELF”
},
“is_queryable”: true,
“is_modifiable”: true
}

it is giving following error
{
“error”: “Bad Request”,
“message”: “Could not resolve subtype of [simple type, class com.nedap.archie.rm.RMObject]: missing type id property ‘_type’\n at [Source: (String)"{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}"; line: 1, column: 271]”
}

any suggestion?

You need to include the _type of the name attribute. See this example which has some handlebar’ type 'varaibles in it

       const ehrStatus = {
            _type: "EHR_STATUS",
            archetype_node_id: "openEHR-EHR-EHR_STATUS.generic.v1",
            name: {
                _type: "DV_TEXT",
                value: "ehr status"
            },
            subject: {
                external_ref: {
                    id: {
                        _type: "HIER_OBJECT_ID",
                        value: '{{subjectId}}',
                    },
                    namespace: '{{subjectNamespace}}',
                    type: "PERSON" // This is overwiritten to 'PARTY_REF' in BetterCDR
                }
            },
            // If not specified these default to false in EhrBase and true in BetterCDR
            is_modifiable: true,
            is_queryable: true
        }

Thanks Ian for the reply, I tried this and it worked and I picked this from some other link but does not give me good understanding. what is good resource to read about this topic which explain concepts better.

{
“_type”: “EHR_STATUS”,
“archetype_node_id”: “openEHR-EHR-EHR_STATUS.generic.v1”,
“name”: {
“value”: “EHR Status”
},
“subject”: {
“external_ref”: {
“id”: {
“_type”: “GENERIC_ID”,
“value”: “ins01”,
“scheme”: “id_scheme”
},
“namespace”: “examples”,
“type”: “PERSON”
}
},
“is_modifiable”: true,
“is_queryable”: true
}

The data structure is based on the EHR_STATUS class

https://specifications.openehr.org/releases/UML/latest/index.html#Architecture___18_1_83e026d_1433773265183_363265_8874