cda datatypes nblock voc common

Element : MO (XML Type: MO )


Package : datatypes

XML Type : MO

Comments : A monetary amount is a quantity expressing the amount of money in some currency. Currencies are the units in which monetary amounts are denominated in different economic regions. While the monetary amount is a single kind of quantity (money) the exchange rates between the different units are variable. This is the principle difference between physical quantity and monetary amounts, and the reason why currency units are not physical units.


Parent : QTY


Name Type cardinality Comment
currency
Attribute : currency
String 0...1 The currency unit as defined in ISO 4217.
value
Attribute : value
Double 0...1 The magnitude of the monetary amount in terms of the currency unit.

constraint_datatypes_MO

  • not ((not self.nullFlavor.oclIsUndefined()) and ((not self.value.oclIsUndefined()) or (not self.currency.oclIsUndefined())))
  • nullFlavor doeas not much if value or curracy are defined (rule-MO from the schema of datatypes-base.xsd)

<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="MO">
      
<xs:annotation>
         
<xs:documentation>
            A monetary amount is a quantity expressing the amount of
            money in some currency. Currencies are the units in which
            monetary amounts are denominated in different economic
            regions. While the monetary amount is a single kind of
            quantity (money) the exchange rates between the different
            units are variable.  This is the principle difference
            between physical quantity and monetary amounts, and the
            reason why currency units are not physical units.
         
</xs:documentation>
         
<xs:appinfo>
            
<diff>MO</diff>
            
<sch:pattern xmlns:sch="http://www.ascc.net/xml/schematron" name="validate MO">
               
<sch:rule abstract="true" id="rule-MO">
                  
<sch:report test="not(@nullFlavor and (@value or @currency))" />
               
</sch:rule>
            
</sch:pattern>
         
</xs:appinfo>
      
</xs:annotation>
      
<xs:complexContent>
         
<xs:extension base="QTY">
            
<xs:attribute name="value" type="real" use="optional">
               
<xs:annotation>
                  
<xs:documentation>
                     The magnitude of the monetary amount in terms of the
                     currency unit.
                  
</xs:documentation>
               
</xs:annotation>
            
</xs:attribute>
            
<xs:attribute name="currency" type="cs" use="optional">
               
<xs:annotation>
                  
<xs:documentation>
                     The currency unit as defined in ISO 4217.
                  
</xs:documentation>
               
</xs:annotation>
            
</xs:attribute>
         
</xs:extension>
      
</xs:complexContent>
   
</xs:complexType>