Origin defines the source metadata, where applicable, for ODM ItemRefs or ItemGroupRefs. Origin as a child element replaces the Origin attribute in ODM v1.3 that exists for the ItemDef and ItemGroupDef elements.

The Origin element is based on the def:Origin element in Define-XML v2.1 with the Trace-XML v1.0 extension.

Element NameOrigin
Parent ElementsItemGroupDef, ItemRef
Element XPath(s)
  • /ODM/Study/MetaDataVersion/ValueListDef/ItemRef/Origin
  • /ODM/Study/MetaDataVersion/ItemGroupDef/Origin
  • /ODM/Study/MetaDataVersion/ItemGroupDef/ItemRef/Origin
Element Textual ValueNone
Attributes

Type, Source

Child Elements

(Description?, SourceItems?, Coding*, DocumentRef*)

The SourceItems element contains SourceItem child elements that reference the source variables, if any, for a given ItemRef. SourceItem elements provide machine-readable traceability and identify specific arguments for a MethodDef, specially when used with an Origin with Type="Derived".

Usage/Business Rules


AttributeSchema Datatype or EnumerationUsageDefinitionBusiness Rule(s)
Type

text

Required

Identifies how the clinical data values were obtained.

  • The list of allowable Origin/@Type attribute values is provided as non-extensible codelists in the CDISC Controlled Terminology, Define-XML package.

* Users are encouraged to refer to the most recent version of the CDISC Controlled Terminology (https://www.cdisc.org/standards/terminology/controlled-terminology).

SourcetextOptionalIndicates the party responsible for the data's origin type.
  • The list of allowable Origin/@Source attribute values  is provided in the CDISC Controlled Terminology, Define-XML package.

* Users are encouraged to refer to the most recent version of the CDISC Controlled Terminology (https://www.cdisc.org/standards/terminology/controlled-terminology).


Example: Origin with FHIR Resource Example

Origin with FHIR Resource Example
<ItemGroupDef OID="ODM.IG.LB.WBC" Name="WBC Lab Results with Unit" Repeating="No" Type="Section" >
	<!-- Subject -->
	<ItemRef ItemOID="ODM.IT.LB.SUBJID" Mandatory="Yes">
	 	<Origin Type="Collected" Source="Investigator">
			<SourceItems>
				<SourceItem>
					<!-- The Subject-ID is obtained from ResearchSubject.identifier -->
					<Resource Type="HL7-FHIR" Name="ResearchSubject" Attribute="identifier"/>
				</SourceItem>
			</SourceItems>
		</Origin>
	</ItemRef>
	<!-- Collected Leukocytes (White Blood Count) with units -->
	<!-- The value itself -->
	<!-- Remark the reference to the units item using UnitsItemOID -->
	<ItemRef ItemOID="ODM.IT.LB.WBC.LBORRES" Mandatory="Yes" UnitsItemOID="ODM.IT.LB.WBC.LBORRESU">
		<Origin Type="Collected" Source="Investigator">
			<SourceItems>
				<SourceItem>
					<!-- The value itself is obtained from Observation.valueQuantity.value -->
					<Resource Type="HL7-FHIR" Name="Observation" Attribute="valueQuantity.value"/>
				</SourceItem>
			</SourceItems>
    	</Origin>
	</ItemRef>
	<!-- The units for the leukocytes measurement -->
    <ItemRef ItemOID="ODM.IT.LB.WBC.LBORRESU" Mandatory="Yes">
	 	<Origin Type="Collected" Source="Investigator">
			<SourceItems>
				<SourceItem>
					<!-- The value itself is obtained from Observation.valueQuantity.unit -->
					<Resource Type="HL7-FHIR" Name="Observation" Attribute="valueQuantity.unit"/>
				</SourceItem>
			</SourceItems>
    	</Origin>
	</ItemRef>
    <!-- LOINC code of the test to be performed -->
	<Coding Code="26464-8" System="http://loinc.org" SystemName="LOINC" SystemVersion="2.92"/>	
</ItemGroupDef>

Example: Origin with FHIR Resource Example - alternative

Origin with FHIR Resource Example - alternative
<?xml version="1.0" encoding="UTF-8"?>
<ItemGroupDef OID="ODM.IG.LB.WBC" Name="WBC Lab Results with Unit" Repeating="No" Type="Section" >
    <!-- The Subject Identifier -->
    <ItemRef ItemOID="ODM.IT.SUBJID" Mandatory="Yes" />
    <!-- Collected Leukocytes (White Blood Count) with units -->
    <!-- The value itself -->
    <!-- Remark the reference to the units item using UnitsItemOID -->
    <ItemRef ItemOID="ODM.IT.LB.WBC.LBORRES" Mandatory="Yes" UnitsItemOID="ODM.IT.LB.WBC.LBORRESU" />
    <!-- The units for the leukocytes measurement -->
    <ItemRef ItemOID="ODM.IT.LB.WBC.LBORRESU" Mandatory="Yes" />
    <!-- LOINC code of the test to be performed -->
    <Coding Code="26464-8" System="http://loinc.org" SystemName="LOINC" SystemVersion="2.92"/>
	<!-- Alternative way of stating the origin of the data in the group, 
		as coming from an Electronic Health Record using the FHIR API, 
		retrieved by the investigator -->
 	<Origin Type="Collected" Source="Investigator">
    	<SourceItems>
			<SourceItem ItemOID="ODM.IT.LB.SUBJID">
            	<!-- The Subject-ID is obtained from ResearchSubject.identifier -->
				<!-- The ItemOID references the ItemDef providing the metadata -->
                <Resource Type="HL7-FHIR" Name="ResearchSubject" Attribute="identifier"/>
            </SourceItem>
		 	<SourceItem ItemOID="ODM.IT.LB.WBC.LBORRES">
				<!-- The value itself is obtained from Observation.valueQuantity.value -->
			 	<!-- The ItemOID references the ItemDef providing the metadata -->
                <Resource Type="HL7-FHIR" Name="Observation" Attribute="valueQuantity.value"/>
            </SourceItem>
            <SourceItem ItemOID="ODM.IT.LB.WBC.LBORRESU">
				<!-- The value itself is obtained from Observation.valueQuantity.unit -->
			 	<!-- The ItemOID references the ItemDef providing the metadata -->
				<Resource Type="HL7-FHIR" Name="Observation" Attribute="valueQuantity.unit"/>
			</SourceItem>
        </SourceItems>
   </Origin>
</ItemGroupDef>

Example: HL7 FHIR eSource Example

Example highlighting the use of the HL7 FHIR standard to retrieve EHR data to use as eSource
HL7 FHIR eSource Example
<?xml version="1.0" encoding="UTF-8"?>
<ODM xmlns="http://www.cdisc.org/ns/odm/v2.0"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    ODMVersion="2.0"
    FileOID="FHIR-examples"
    FileType="Snapshot"
    CreationDateTime="2020-09-02T11:20:00">    
    <Study OID="fhir-odm-esource-study" StudyName="FHIR eSource" ProtocolName="FHIR-eSource-Demo-01">
        <Description>
            <TranslatedText xml:lang="en" Type="text/plain">FHIR eSource Demo Study</TranslatedText>
        </Description>
        
        <MetaDataVersion OID="MDV.fhir-odm" Name="FHIR eSource MDV">
            
            <ItemGroupDef OID="ODM.IG.COMMON" Name="Common" Repeating="No" Type="Form">
                <ItemRef ItemOID="ODM.IT.Common.StudyID" Mandatory="Yes"/>
                <ItemRef ItemOID="ODM.IT.Common.SiteID" Mandatory="Yes"/>
                <ItemRef ItemOID="ODM.IT.Common.SubjectID" Mandatory="Yes"/>
                <ItemRef ItemOID="ODM.IT.Common.Visit"  Mandatory="Yes"/>
            </ItemGroupDef>
            
            <ItemGroupDef OID="ODM.IG.LB" Name="LAB Measurements" Repeating="No" Type="Form">
                <ItemRef ItemOID="ODM.IT.LB.LBDTC" Mandatory="Yes"/>
                <ItemGroupRef ItemGroupOID="ODM.IG.LB.WBC" Mandatory="Yes" MethodOID="ODM.MT.LB.LBORRES"/>
                <ItemRef ItemOID="ODM.IT.LB.ALB.LBORRES" Mandatory="Yes"/>
                <ItemRef ItemOID="ODM.IT.LB.ALB.LBORRESU" Mandatory="Yes"/>
                <ItemRef ItemOID="ODM.IT.LB.GLUC.LBORRES" Mandatory="Yes"/>
                <ItemRef ItemOID="ODM.IT.LB.GLUC.LBORRESU" Mandatory="Yes"/>
            </ItemGroupDef>
            
            <ItemGroupDef OID="ODM.IG.LB.WBC" Name="WBC Lab Results with Unit" Repeating="No" Type="Form">
                <ItemRef ItemOID="ODM.IT.LB.WBC.LBORRES" UnitsItemOID="ODM.IT.LB.WBC.LBORRESU" Mandatory="Yes"/>
                <ItemRef ItemOID="ODM.IT.LB.WBC.LBORRESU" Mandatory="Yes"/>              
                
                <Origin Type="EHR" Source="Investigator">
                    <Description>
                        <TranslatedText xml:lang="en" Type="text/plain">Lab values retrieved from EHR using FHIR</TranslatedText>
                    </Description>                  
                    <SourceItems>
                        <SourceItem>
                            <Resource Type="HL7-FHIR" Name="Observation" Attribute="valueQuantity.value" Label="value">
                                <Selection Path="Resource/@Name='Observation' and Resource/@Attribute='valueQuantity.value"/>
                            </Resource>  
                        </SourceItem>
                        <SourceItem>
                            <Resource Type="HL7-FHIR" Name="Observation" Attribute="valueQuantity.unit" Label="unit">
                                <Selection Path="Resource/@Name='Observation' and Resource/@Attribute='valueQuantity.unit"/>                              
                            </Resource>
                        </SourceItem>
                        <Coding Code="26464-8" System="http://loinc.org" SystemName="LOINC" SystemVersion="2.61" Label="loinc_code"/>
                    </SourceItems>
                </Origin>
            </ItemGroupDef>
            
            <ItemDef OID="ODM.IT.LB.WBC.LBORRES" Name="WBC" DataType="float" Length="3">
                <Description>
                    <TranslatedText xml:lang="en" Type="text/plain">Result of the measurement or finding as originally received or collected.</TranslatedText>
                </Description>
                <Question>
                    <TranslatedText xml:lang="en" Type="text/plain">Result</TranslatedText>
                </Question>
                <Coding Code="26464-8" System="http://loinc.org" SystemName="LOINC" SystemVersion="2.61"/>
                <Alias Context="SAS" Name="LBORRES"/>
            </ItemDef>
            
            <ItemDef OID="ODM.IT.LB.WBC.LBORRESU" Name="LBORRESU" DataType="text" Length="6">
                <Description>
                    <TranslatedText xml:lang="en" Type="text/plain">WBC</TranslatedText>
                </Description>
                <CodeListRef CodeListOID="CL.LBORRESU"/>
                <Coding Code="26464-8" System="http://loinc.org" SystemName="LOINC" SystemVersion="2.61"/>
                <Alias Context="SAS" Name="LBORRESU"/>            
            </ItemDef>

            <CodeList OID="CL.LBORRESU" Name="Unit (LBRESU)" DataType="text">
                <CodeListItem CodedValue="10^9/L">
                    <Alias Name="C67255" Context="nci:ExtCodeID"/> 
                </CodeListItem>
                <Alias Name="C71620" Context="nci:ExtCodeID"/>
            </CodeList>

            <MethodDef OID="ODM.MT.LB.LBORRES" Name="Retrieve Lab Result using FHIR" Type="Preload">
                <Description><TranslatedText xml:lang="en" Type="text/plain">FHIR API call definition to retrieve lab result</TranslatedText></Description>
                <MethodSignature>
                    <Parameter Name="value" Definition="Lab Result" DataType="text"/>
                    <Parameter Name="unit" Definition="Result Unit" DataType="text"/>
                    <Parameter Name="loinc_code" Definition="LOINC Code" DataType="text"/>
                    <ReturnValue Name="LBORRES" Definition="Lab result from the EHR system" DataType="text"/>
                    <ReturnValue Name="LBORRESU" Definition="Lab result from the EHR system" DataType="text"/>
                </MethodSignature>
                <FormalExpression Context="Python 3.7">
                    <!-- assumes have access to study state (e.g. subjectid, studyid, etc) and can retrieve patient_id using ResearchSubject -->
                    <!-- assumes libraries have been imported: "from fhirclient import client" and "import fhirclient.models.observation as ob" -->
                    <Code>
                        smart = client.FHIRClient(settings={'app_id': 'rof_adapter', 'api_base': 'https://api.logicahealth.org/STU301withSynthea/open'})
                        search_obs = ob.Observation.where(struct=dict(patient=patient_id, code=loinc_code))
                        value = ""
                        unit = ""
                        if search_obs.perform_resources(smart.server):
                        obs = search_obs.perform_resources(smart.server).pop().as_json()
                        lborres = obs[value.split(".")[0]][value.split(".")[1]]
                        lborresu = obs[unit.split(".")[0]][unit.split(".")[1]]
                        return lborres, lborresu
                    </Code>
                </FormalExpression>
            </MethodDef>
        </MetaDataVersion>
    </Study>
</ODM>

  • No labels