FLAT example of a DV_INTERVAL<DV_COUNT>

Does anyone have an example of a DV_INTERVAL<DV_COUNT> in flat format (for EHRBase)? Also an interval of something else (e.g. DV_INTERVAL<DV_DATE>) would be good too.

I created a set of dummy test archetypes and used them in a dummy template, to create an example FLAT JSON via EHRbase. Is that what you are looking for?

{
  "intervalltesttemplate.v0.1.0/category|code" : "433",
  "intervalltesttemplate.v0.1.0/category|value" : "event",
  "intervalltesttemplate.v0.1.0/category|terminology" : "openehr",
  "intervalltesttemplate.v0.1.0/context/start_time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/context/setting|code" : "225",
  "intervalltesttemplate.v0.1.0/context/setting|terminology" : "openehr",
  "intervalltesttemplate.v0.1.0/context/setting|value" : "home",
  "intervalltesttemplate.v0.1.0/context/_end_time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/context/_health_care_facility|name" : "DOE, John",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/intervallcountitem/lower" : 42,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/intervallcountitem/upper" : 42,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/intervallcountitem|lower_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/intervallcountitem|upper_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/width" : "PT42H",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/math_function|terminology" : "openehr",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/math_function|code" : "145",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:0/math_function|value" : "minimum",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:1/intervallcountitem/lower" : 42,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:1/intervallcountitem/upper" : 42,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:1/intervallcountitem|lower_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:1/intervallcountitem|upper_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:1/time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/intervallcountitem/lower" : 42,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/intervallcountitem/upper" : 42,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/intervallcountitem|lower_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/intervallcountitem|upper_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/width" : "PT42H",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/math_function|terminology" : "openehr",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/math_function|code" : "145",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/any_event:2/math_function|value" : "minimum",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/language|code" : "en",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/language|terminology" : "ISO_639-1",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/encoding|terminology" : "IANA_character-sets",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/encoding|code" : "UTF-8",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_work_flow_id|id" : "3f28ef8c-5936-3b76-ad27-fd3260964644",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_work_flow_id|id_scheme" : "scheme",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_work_flow_id|namespace" : "unknown",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_work_flow_id|type" : "ANY",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_guideline_id|id" : "7d4471de-fd25-3b30-a35b-015fc9421e39",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_guideline_id|id_scheme" : "scheme",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_guideline_id|namespace" : "unknown",
  "intervalltesttemplate.v0.1.0/single_intervall_count_test_archetype/_guideline_id|type" : "ANY",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/intervalldateitem/lower" : "2022-02-03",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/intervalldateitem/upper" : "2022-02-03",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/intervalldateitem|lower_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/intervalldateitem|upper_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/width" : "PT42H",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/math_function|terminology" : "openehr",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/math_function|value" : "minimum",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:0/math_function|code" : "145",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:1/intervalldateitem/lower" : "2022-02-03",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:1/intervalldateitem/upper" : "2022-02-03",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:1/intervalldateitem|lower_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:1/intervalldateitem|upper_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:1/time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/intervalldateitem/lower" : "2022-02-03",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/intervalldateitem/upper" : "2022-02-03",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/intervalldateitem|lower_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/intervalldateitem|upper_included" : false,
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/time" : "2022-02-03T04:05:06",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/width" : "PT42H",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/math_function|code" : "145",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/math_function|terminology" : "openehr",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/any_event:2/math_function|value" : "minimum",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/language|code" : "en",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/language|terminology" : "ISO_639-1",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/encoding|code" : "UTF-8",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/encoding|terminology" : "IANA_character-sets",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_work_flow_id|id" : "e59bca52-0b5b-3faa-9e1e-61a001b083dc",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_work_flow_id|id_scheme" : "scheme",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_work_flow_id|namespace" : "unknown",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_work_flow_id|type" : "ANY",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_guideline_id|id" : "da4d6650-34c9-3de7-b659-1c1400a9e4d4",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_guideline_id|id_scheme" : "scheme",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_guideline_id|namespace" : "unknown",
  "intervalltesttemplate.v0.1.0/single_intervall_date_test_archetype/_guideline_id|type" : "ANY",
  "intervalltesttemplate.v0.1.0/language|terminology" : "ISO_639-1",
  "intervalltesttemplate.v0.1.0/language|code" : "en",
  "intervalltesttemplate.v0.1.0/territory|code" : "DE",
  "intervalltesttemplate.v0.1.0/territory|terminology" : "ISO_3166-1",
  "intervalltesttemplate.v0.1.0/composer|name" : "Max Mustermann"
}
1 Like

yes, just a confirmation.
intervallcountitem in your webtemplate is the id of the leaf with rm type DV_INTERVAL<DV_COUNT> isn’t it?

Yes, that’s how I would interpret it too.

thanks @jake.smolka

in my webtemplate I have the id=“interval<dv_count>_value” (if I create a composition in Better Designer the same leaf is called interval_count_value) but this is not recognized instantiating as you do,
i.e.

 "interhealth_cancer_registry/laboratory_tests/laboratory_test_result/any_event:0/laboratory_analyte_result/analyte_result:16/interval<dv_count>_value|upper_unbounded": false,
 "interhealth_cancer_registry/laboratory_tests/laboratory_test_result/any_event:0/laboratory_analyte_result/analyte_result:16/interval<dv_count>_value|lower": 14,  
 "interhealth_cancer_registry/laboratory_tests/laboratory_test_result/any_event:0/laboratory_analyte_result/analyte_result:16/interval<dv_count>_value|upper": 19,
 "interhealth_cancer_registry/laboratory_tests/laboratory_test_result/any_event:0/laboratory_analyte_result/analyte_result:16/interval<dv_count>_value|lower_included": true,  
 "interhealth_cancer_registry/laboratory_tests/laboratory_test_result/any_event:0/laboratory_analyte_result/analyte_result:16/interval<dv_count>_value|upper_included": true,

any idea why it fails with Bad Request and message=Could not consume Parts ?

@jake.smolka In your example, / is used for lower/upper but | for lower_included/upper_included. However in the @surfer example the | is used for all 4.

"intervalldateitem/lower" : "2022-02-03",
"intervalldateitem/upper" : "2022-02-03",
"intervalldateitem|lower_included" : false,
"intervalldateitem|upper_included" : false,

using the / for lower/upper the result is the same. All the paths are not considered valid by EHRBase. Maybe what’s shown as id in the EHRBase webtemplate does not reflect what is considered valid inside the EHRBase code. @stefanspiska is that possible?

(I’m now using the webtemplate created by version 0.32 to avoid the issue @stefanspiska signalled for recent EHRBase versions)

Its /lower

and < is not a valid flat id. so something went wrong there.

do you know how an interval of something is translated into an id? we are talking about a path where multiple rm types are allowed so they are distinguished by an id, generated by the code I suppose.

The id are generated from the names of the elements in the Rm model.
There are some complex comer cases when you have reputing names or choice elements.

If you OPT generated a web template with < then there was an error somewhere so please create an issue in github with the opt.

If you just want to try out stuff create an archetype yourself with fixed rm type and ensure that the names do not contain a-x.

ok, will do. thank you

I created an archetype with a leaf with only the rm dv_interval<dv_count> and a template to contain the data and it worked.
So the problem seems associated to the coexistence of multiple rm types at the same path and/or to that specific template.

P.S I created the issue in github