Data type NM in FHIR

How the components of data type NM (Numeric) become FHIR R4 elements, from the HL7 Version 2 to FHIR guide.

HL7 v2 definition
Definition of NM in HL7 v2 2.8
Maps
Quantity (LengthOfStay)PositiveIntQuantity

To QuantityLengthOfStay4 rows

HL7 v2 sourcev2 typeFHIR elementFHIR typeConditions and notes
NM.1
STvalue
If positive
NM.1
STunit
If positiveValue "days"
NM.1
STsystem
If positiveValue "http://unitsofmeasure.org/"
NM.1
STcode
If positiveValue "d"

To PositiveInt1 rows

HL7 v2 sourcev2 typeFHIR elementFHIR typeConditions and notes
NM.1
ST$valueinteger
If positive

To Quantity1 rows

HL7 v2 sourcev2 typeFHIR elementFHIR typeConditions and notes
NM.1
$valuedecimal