# Any tools that can facilitate insertions of variable names in a template **Category:** [Tools](https://discourse.openehr.org/c/tool-dev/36) **Created:** 2024-10-09 07:50 UTC **Views:** 78 **Replies:** 3 **URL:** https://discourse.openehr.org/t/any-tools-that-can-facilitate-insertions-of-variable-names-in-a-template/5782 --- ## Post #1 by @linforest [quote="ian.mcnicoll, post:1, topic:1199"] Better CDR ``` { "_type": "EHR_STATUS", // "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1", // "name": "ehr status", "subject": { "external_ref": { "id": { "_type": "HIER_OBJECT_ID", "value": "{{subjectId}}" }, "namespace": "{{subjectNamespace}}", "type": "PERSON" } }, "is_modifiable": "true", "is_queryable": "true" } ``` [/quote] Hi, @ian.mcnicoll. May I ask a question about the variable names in your snippet? Such a variable name double-curly-braced is inserted automatically or manually? When using a simplified template such as FLAT JSON to automatically populate/generate Composition instances, is there any tools that can facilitate insertions of variable names in the template? For a "template", I mean a Composition instance to be populated. Thanks. --- ## Post #2 by @linforest For example, is there any tools that can automatically insert the vairiable name "{{bodyTemperature}}" in the Web Template JSON just like the REST API to GET an example Composition based on a specified OPT template? ``` { "vital_signs/body_temperature/any_event/temperature|magnitude": "{{bodyTemperature}}" , "vital_signs/body_temperature/any_event/temperature|unit": "℃" ... } ``` --- ## Post #3 by @ian.mcnicoll Hi Lin, That example is a part of our Postman collection - Postman is a lovely tool and it has a fairly sophisticated way of allowing you to inject variables, including from test data csv files etc. For more sophisticated use, there are a number of different templating engines, one of the more popular being Liquid templates - see https://github.com/microsoft/FHIR-Converter?tab=readme-ov-file for some ideas. --- ## Post #4 by @linforest Thanks a lot, @ian.mcnicoll. It's exactly what I want. --- **Canonical:** https://discourse.openehr.org/t/any-tools-that-can-facilitate-insertions-of-variable-names-in-a-template/5782 **Original content:** https://discourse.openehr.org/t/any-tools-that-can-facilitate-insertions-of-variable-names-in-a-template/5782