# DV_QUANTITY_RATIO - remove from specification **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2006-11-30 17:03 UTC **Views:** 51 **Replies:** 13 **URL:** https://discourse.openehr.org/t/dv-quantity-ratio-remove-from-specification/14593 --- ## Post #1 by @Sam Dear All We have been working on the data types as we have known that there is a need to deal with fractions, ratios and percentages when the idea is of proportion - ie there is no units. Since the DV_QUANTITY_RATIO points to anything Quantified (ie count, date_time, duration) there are many non-sensible possibilities and although it has been around since the GEHR days, we have not used it for anything other than the idea of the new DV_PROPORTION type (which will be available in 1.0.1). I have filed a change request which explains how the perceived requirements for this type have largely been dealt with in archetypes: [http://coruscant.chime.ucl.ac.uk:8200/openEHR_Collector/projects/specifications/CR/227/base_view?portal_status_message=Your%20changes%20have%20been%20saved.&fieldset=issuedata](http://coruscant.chime.ucl.ac.uk:8200/openEHR_Collector/projects/specifications/CR/227/base_view?portal_status_message=Your%20changes%20have%20been%20saved.&fieldset=issuedata) Tom will let you know about the DV_PROPORTION class. [http://coruscant.chime.ucl.ac.uk:8200/openEHR_Collector/projects/specifications/CR/144/base_view?portal_status_message=Your%20changes%20have%20been%20saved.&fieldset=issuedata](http://coruscant.chime.ucl.ac.uk:8200/openEHR_Collector/projects/specifications/CR/144/base_view?portal_status_message=Your%20changes%20have%20been%20saved.&fieldset=issuedata) Interested in comments and queries... Cheers, Sam --- ## Post #2 by @Mattias_Forss1 2006/11/30, Sam Heard <[sam.heard@oceaninformatics.biz](mailto:sam.heard@oceaninformatics.biz)>: > Dear All > > We have been working on the data types as we have known that there is a need to deal with fractions, ratios and percentages when the idea is of proportion - ie there is no units. Since the DV_QUANTITY_RATIO points to anything Quantified (ie count, date_time, duration) there are many non-sensible possibilities and although it has been around since the GEHR days, we have not used it for anything other than the idea of the new DV_PROPORTION type (which will be available in 1.0.1). Hi Sam, Does this mean that the ratio constraint could as of now be removed from the archetype editors? Will the DV_RATIO class be removed from the specifications as well? If not, should the editors change the current ratio constraint to be of a DV_RATIO instead of a DV_QUANTITY_RATIO? I think that the new DV_PROPORTION class could be used instead of DV_QUANTITY when there are no units, e.g. only the property 'Qualified real' and the empty string as a unit or a missing unit attribute in the item list of C_QUANTITY and only a magnitude attribute. The current ADL parser doesn't expect empty or null units which is correct according to the specification of C_QUANTITY_ITEM in the archetype profile package. Hence, there should always be a unit specified for each item in the item list of C_QUANTITY in archetypes and it cannot be empty because quantified data with no units could be represented with the DV_PROPORTION data type, right? If you have a look at the blood film archetype (here: [http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0](http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0)) you will see that the elements named 'Packed cell volume (PCV)' and 'Plateletcrit' are quantity data types with empty units, but maybe they could be changed to proportion data types instead? If not, then the specification of C_QUANTITY_ITEM must be changed. Another issue not at all related to the above: The Ocean editor writes other_contributors = <> in the description part when there are no other contributors, but since the attribute is not mandatory, garbage like this should be removed from the archetypes. If the attribute exists, then it should contain something as well. I would like this to be fixed, because it makes the Java ADL parser fail... Regards, Mattias --- ## Post #3 by @thomas.beale Mattias Forss wrote: > > Another issue not at all related to the above: > The Ocean editor writes other\_contributors = <> in the description > part when there are no other contributors, but since the attribute is > not mandatory, garbage like this should be removed from the > archetypes\. If the attribute exists, then it should contain something > as well\. I would like this to be fixed, because it makes the Java ADL > parser fail\.\.\. it shouldn't, since it is perfectly legal, but I agree it should be removed from archetypes, since it gives no information\.\.\.I'll answer the other notes later \(mostly I agree with you\)\. We are working to redo all the archetypes \- most of the bugs reported have been sorted in the Archetype Editor\. However, this last few weeks there has been a huge upsurge in interest in openEHR, so we are a bit behind in the technical work\. \- thomas --- ## Post #4 by @thomas.beale Mattias Forss wrote: > 2006/11/30, Sam Heard <[sam.heard@oceaninformatics.biz](mailto:sam.heard@oceaninformatics.biz)>: > > > Dear All > > > > We have been working on the data types as we have known that there is a need to deal with fractions, ratios and percentages when the idea is of proportion - ie there is no units. Since the DV_QUANTITY_RATIO points to anything Quantified (ie count, date_time, duration) there are many non-sensible possibilities and although it has been around since the GEHR days, we have not used it for anything other than the idea of the new DV_PROPORTION type (which will be available in 1.0.1). > > Hi Sam, > > Does this mean that the ratio constraint could as of now be removed from the archetype editors? Will the DV_RATIO class be removed from the specifications as well? If not, should the editors change the current ratio constraint to be of a DV_RATIO instead of a DV_QUANTITY_RATIO? this is the expected approach. I know it is annoying for us to make this software change, but we cannot escape the fact that there were some categories of clinical data that were not properly addressed by the current data types. > I think that the new DV_PROPORTION class could be used instead of DV_QUANTITY when there are no units, e.g. only the property 'Qualified real' and the empty string as a unit or a missing unit attribute in the item list of C_QUANTITY and only a magnitude attribute. The current ADL parser doesn't expect empty or null units which is correct according to the specification of C_QUANTITY_ITEM in the archetype profile package. Hence, there should always be a unit specified for each item in the item list of C_QUANTITY in archetypes and it cannot be empty because quantified data with no units could be represented with the DV_PROPORTION data type, right? DV_COUNT will take care of countable things - also with no units. Otherwise, anything else with no units I think will end up being a DV_PROPORTION - is we think of "proportion" as the idea of "relative amount", "how much of a total", then it is quite a wide concept that is likely to cover many situations. Sam and I believe your assumption is pretty safe at the moment. > If you have a look at the blood film archetype (here: [http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0](http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0)) you will see that the elements named 'Packed cell volume (PCV)' and 'Plateletcrit' are quantity data types with empty units, but maybe they could be changed to proportion data types instead? If not, then the specification of C_QUANTITY_ITEM must be changed. Sam - I imagine this is right - can you check this? Although we have not yet uploaded cleaner archetypes with all the changes everyone wants, we have nearly done all the changes to the tools, and the next generation of archetypes on the openEHR website should address everything. After that we should be able to proceed faster, since I think we will have removed all the anomalies in tools with respect to the specification, and also fixed a few anomalies in the specfication. - thomas --- ## Post #5 by @Mattias_Forss1 2006/12/8, Thomas Beale <[Thomas.Beale@oceaninformatics.biz](mailto:Thomas.Beale@oceaninformatics.biz)>: > Mattias Forss wrote: > > > Does this mean that the ratio constraint could as of now be removed from the archetype editors? Will the DV_RATIO class be removed from the specifications as well? If not, should the editors change the current ratio constraint to be of a DV_RATIO instead of a DV_QUANTITY_RATIO? > > this is the expected approach. I know it is annoying for us to make this software change, but we cannot escape the fact that there were some categories of clinical data that were not properly addressed by the current data types. Not sure what your answer is here, can the ratio constraint be removed from the editors or not? > > I think that the new DV_PROPORTION class could be used instead of DV_QUANTITY when there are no units, e.g. only the property 'Qualified real' and the empty string as a unit or a missing unit attribute in the item list of C_QUANTITY and only a magnitude attribute. The current ADL parser doesn't expect empty or null units which is correct according to the specification of C_QUANTITY_ITEM in the archetype profile package. Hence, there should always be a unit specified for each item in the item list of C_QUANTITY in archetypes and it cannot be empty because quantified data with no units could be represented with the DV_PROPORTION data type, right? > > DV_COUNT will take care of countable things - also with no units. Otherwise, anything else with no units I think will end up being a DV_PROPORTION - is we think of "proportion" as the idea of "relative amount", "how much of a total", then it is quite a wide concept that is likely to cover many situations. Sam and I believe your assumption is pretty safe at the moment. Understood, the proportion data type makes a lot more sense than the DV_QUANTITY_RATIO which allowed a lot of different quantifiable data types. There is no need to make things more complicated than they are and the simplification with DV_PROPORTION is great. > > If you have a look at the blood film archetype (here: [http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0](http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0)) you will see that the elements named 'Packed cell volume (PCV)' and 'Plateletcrit' are quantity data types with empty units, but maybe they could be changed to proportion data types instead? If not, then the specification of C_QUANTITY_ITEM must be changed. > > Sam - I imagine this is right - can you check this? > > Although we have not yet uploaded cleaner archetypes with all the changes everyone wants, we have nearly done all the changes to the tools, and the next generation of archetypes on the openEHR website should address everything. After that we should be able to proceed faster, since I think we will have removed all the anomalies in tools with respect to the specification, and also fixed a few anomalies in the specfication. It would be great if the archetypes could be updated soon. Could I get a listing of the changes so I can update the Java archetype editor accordingly? Regards, Mattias --- ## Post #6 by @Sam Correct, have been waiting for the proportion type....Cheers, Sam Thomas Beale wrote: --- ## Post #7 by @Sam Yes, and replaced with Proportion which is a more general concept. Sam Mattias Forss wrote: --- ## Post #8 by @thomas.beale Sam Heard wrote: > Yes, and replaced with Proportion which is a more general concept\. Sam well, to be correct, we should wait for the ARB judgement on this\. \- thomas --- ## Post #9 by @thomas.beale Mattias Forss wrote: > > It would be great if the archetypes could be updated soon\. Could I get > a listing of the changes so I can update the Java archetype editor > accordingly? Thanks mattias, I think we should upload a set that have many/most of the improvements your work has introduced, I hope in a week or less \- the changes are being done \- just a lot of checking to do\. But I think most of the pain is over now\.\.\.but you can feel sure that the annoyance value on your part is not for nothing \- we greatly appreciate your contributions and patience\. \- thomas --- ## Post #10 by @Tim_Churches Sam Heard wrote: > Yes, and replaced with Proportion which is a more general concept\. Sam Surely a proportion has to be constrained to lie between 0\.0 and 1\.0? How can that be used to express quantities without units which are greater than one \(without the added complication of a multiplier\)\. A ratio has no such constraints\. Or have I misunderstood what is intended? Tim C --- ## Post #11 by @Sam Dear Tim The reality is that PCV and Red Cell Distribution width are proportions and as such have no units. So the new data type meets the needs you have identified. One aspect is to constrain the magnitude (which is a function) and might usefully be set. Cheers, Sam Tim Churches wrote: --- ## Post #12 by @Dr_LONJON_Roger Hello,   The semantic debate, if I understood door well on the way to represent an exploitable data by a computer\. The topic is the numeration formulates red chalk\. it exists an unit well to know the number of globules counted on the one hand by reference to an unit of volume and a percentage in relation to the other cells in the same unit of volume\. Excuse me if my remark is to quoted of the question, because my comprehension of the technical English is basic\. cordially Dr R LONJON France Selon Sam Heard <sam\.heard@oceaninformatics\.biz>: > Dear Tim > > The reality is that PCV and Red Cell Distribution width are proportions > and as such have no units\. So the new data type meets the needs you > have identified\. One aspect is to constrain the magnitude \(which is a > function\) and might usefully be set\. > > Cheers, Sam > > Tim Churches wrote: > >   Sam Heard wrote: > >     Yes, and replaced with Proportion which is a more general concept\. Sam > > Surely a proportion has to be constrained to lie between 0\.0 and 1\.0? > How can that be used to express quantities without units which are > greater than one \(without the added complication of a multiplier\)\. A > ratio has no such constraints\. > > Or have I misunderstood what is intended? > > Tim C > >     Mattias Forss wrote: > > 2006/12/8, Thomas Beale <Thomas\.Beale@oceaninformatics\.biz > <mailto:Thomas.Beale@oceaninformatics.biz>>: > >     Mattias Forss wrote: > >             Does this mean that the ratio constraint could as of now be > removed from >     the archetype editors? Will the DV\_RATIO class be removed from the >     specifications as well? If not, should the editors change the current >     ratio constraint to be of a DV\_RATIO instead of a DV\_QUANTITY\_RATIO? > >           this is the expected approach\. I know it is annoying for us to make > this >     software change, but we cannot escape the fact that there were some >     categories of clinical data that were not properly addressed by the >     current data types\. > > Not sure what your answer is here, can the ratio constraint be removed from > the editors or not? > >             I think that the new DV\_PROPORTION class could be used instead of >     DV\_QUANTITY when there are no units, e\.g\. only the property 'Qualified >     real' and the empty string as a unit or a missing unit attribute in the >     item list of C\_QUANTITY and only a magnitude attribute\. The current ADL >     parser doesn't expect empty or null units which is correct according to >     the specification of C\_QUANTITY\_ITEM in the archetype profile package\. >     Hence, there should always be a unit specified for each item in the item >     list of C\_QUANTITY in archetypes and it cannot be empty because >     quantified data with no units could be represented with the DV\_PROPORTION >     data type, right? > >           DV\_COUNT will take care of countable things \- also with no units\. >     Otherwise, anything else with no units I think will end up being a >     DV\_PROPORTION \- is we think of "proportion" as the idea of "relative >     amount", "how much of a total", then it is quite a wide concept that is >     likely to cover many situations\. Sam and I believe your assumption is >     pretty safe at the moment\. > > Understood, the proportion data type makes a lot more sense than the > DV\_QUANTITY\_RATIO which allowed a lot of different quantifiable data types\. > There is no need to make things more complicated than they are and the > simplification with DV\_PROPORTION is great\. > >             If you have a look at the blood film archetype \(here: > http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0 > <http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_film.v1.adl?op=file&rev=0&sc=0>\) --- ## Post #13 by @system > Mattias Forss wrote: > > > > > > It would be great if the archetypes could be updated soon. Could I get > > a listing of the changes so I can update the Java archetype editor > > accordingly? > Thanks mattias, > I think we should upload a set that have many/most of the improvements > your work has introduced, I hope in a week or less - the changes are > being done - just a lot of checking to do. But I think most of the pain > is over now...but you can feel sure that the annoyance value on your > part is not for nothing - we greatly appreciate your contributions and > patience. I agree! :) Can I suggest that we put a minimum set of Archetypes for compatibility/interoperability test? Don't need to be clinical meaningful but should include all the possible features from the AOM and RM. /Rong --- ## Post #14 by @thomas.beale Rong Chen wrote: > >     Mattias Forss wrote: >     > >     > >     > It would be great if the archetypes could be updated soon\. Could >     I get >     > a listing of the changes so I can update the Java archetype editor >     > accordingly? >     Thanks mattias, >     I think we should upload a set that have many/most of the improvements >     your work has introduced, I hope in a week or less \- the changes are >     being done \- just a lot of checking to do\. But I think most of the >     pain >     is over now\.\.\.but you can feel sure that the annoyance value on your >     part is not for nothing \- we greatly appreciate your contributions and >     patience\. > > I agree\! :\) > > Can I suggest that we put a minimum set of Archetypes for > compatibility/interoperability test? Don't need to be clinical > meaningful but should include all the possible features from the AOM > and RM\. yes, all it requires is working on the archetypes found in the "test" directory of the knowledge repository\. \- thomas --- **Canonical:** https://discourse.openehr.org/t/dv-quantity-ratio-remove-from-specification/14593 **Original content:** https://discourse.openehr.org/t/dv-quantity-ratio-remove-from-specification/14593