#NEWLINE# def implStructureDefinition1( self , inst ) : #NEWLINE# #INDENT# self . assertFalse ( inst . abstract ) #NEWLINE# self . assertEqual ( inst . base , 'http://hl7.org/fhir/StructureDefinition/DiagnosticReport' ) #NEWLINE# self . assertEqual ( inst . code [ 0 ] . code , '314079002' ) #NEWLINE# self . assertEqual ( inst . code [ 0 ] . display , '314079002' ) #NEWLINE# self . assertEqual ( inst . code [ 0 ] . system , 'http://snomed.info/sct' ) #NEWLINE# self . assertEqual ( inst . constrainedType , 'DiagnosticReport' ) #NEWLINE# self . assertEqual ( inst . contact [ 0 ] . name , 'Grahame Grieve' ) #NEWLINE# self . assertEqual ( inst . contact [ 0 ] . telecom [ 0 ] . system , 'email' ) #NEWLINE# self . assertEqual ( inst . contact [ 0 ] . telecom [ 0 ] . value , 'grahame@healthintersections.com.au' ) #NEWLINE# self . assertEqual ( inst . copyright , 'Createive Commons 0, per FHIR specification' ) #NEWLINE# self . assertEqual ( inst . date . date , FHIRDate ( '2012-05-12' ) . date ) #NEWLINE# self . assertEqual ( inst . date . as_json ( ) , '2012-05-12' ) #NEWLINE# self . assertEqual ( inst . description , 'Describes how the lab report is used for a standard Lipid Profile - Cholesterol, Triglyceride and Cholesterol fractions. Uses LOINC codes' ) #NEWLINE# self . assertEqual ( inst . display , 'Example Lipid Profile' ) #NEWLINE# self . assertTrue ( inst . experimental ) #NEWLINE# self . assertEqual ( inst . fhirVersion , '1.0.0' ) #NEWLINE# self . assertEqual ( inst . id , 'example' ) #NEWLINE# self . assertEqual ( inst . identifier [ 0 ] . system , 'urn:ietf:rfc:3986' ) #NEWLINE# self . assertEqual ( inst . identifier [ 0 ] . value , '1.2.36.90146595217.4.2' ) #NEWLINE# self . assertEqual ( inst . kind , 'resource' ) #NEWLINE# self . assertEqual ( inst . mapping [ 0 ] . comments , "Actual mappings haven't yet been filled out" ) #NEWLINE# self . assertEqual ( inst . mapping [ 0 ] . identity , 'm1' ) #NEWLINE# self . assertEqual ( inst . mapping [ 0 ] . name , 'RCPA Lipid Report recommendations' ) #NEWLINE# self . assertEqual ( inst . mapping [ 0 ] . uri , 'https://www.rcpa.edu.au/getattachment/0961c6d1-ec80-4500-8dc0-de516500e05b/Lipid-and-lipoprotein-testing.aspx' ) #NEWLINE# self . assertEqual ( inst . name , 'Example Lipid Profile' ) #NEWLINE# self . assertEqual ( inst . publisher , 'Health Intersections Pty Ltd' ) #NEWLINE# self . assertEqual ( inst . requirements , 'Provide an example to demonstrate how to use StructureDefinition' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . base . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . base . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . base . path , 'DiagnosticReport' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . definition , 'The findings and interpretation of a general lipd lab profile.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 0 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . name , 'LipidProfile' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . path , 'DiagnosticReport' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . short , 'Lipid Lab Report' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 0 ] . type [ 0 ] . code , 'Resource' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . base . max , '*' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . base . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . base . path , 'DiagnosticReport.extension' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 1 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . max , '*' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . path , 'DiagnosticReport.extension' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . short , 'Additional Content defined by implementations' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . slicing . discriminator [ 0 ] , 'url' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 1 ] . slicing . ordered ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . slicing . rules , 'open' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 1 ] . type [ 0 ] . code , 'Extension' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . alias [ 0 ] , 'narrative' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . alias [ 1 ] , 'html' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . alias [ 2 ] , 'xhtml' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . alias [ 3 ] , 'display' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . base . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . base . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . base . path , 'DiagnosticReport.text' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . comments , 'Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 2 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . path , 'DiagnosticReport.text' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . short , 'Text summary of the resource, for human interpretation' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 2 ] . type [ 0 ] . code , 'Narrative' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . alias [ 0 ] , 'inline resources' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . alias [ 1 ] , 'anonymous resources' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . alias [ 2 ] , 'contained resources' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . base . max , '*' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . base . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . base . path , 'DiagnosticReport.contained' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . comments , 'This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 3 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . max , '*' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . path , 'DiagnosticReport.contained' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . short , 'Contained, inline Resources' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 3 ] . type [ 0 ] . code , 'Resource' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . base . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . base . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . base . path , 'DiagnosticReport.status' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . binding . strength , 'required' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . comments , 'This is labeled as "Is Modifier" because applications need to take appropriate action if a report is withdrawn.' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . definition , 'The status of the diagnostic report as a whole.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 4 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . path , 'DiagnosticReport.status' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . short , 'registered|interim|final|amended|cancelled|withdrawn' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 4 ] . type [ 0 ] . code , 'code' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . base . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . base . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . base . path , 'DiagnosticReport.issued' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . comments , 'May be different from the update time of the resource itself, because that is the status of the record (potentially a secondary copy), not the actual release time of the report.' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . definition , 'The date and/or time that this version of the report was released from the source diagnostic service.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 5 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . path , 'DiagnosticReport.issued' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . short , 'Date this version was released' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 5 ] . type [ 0 ] . code , 'dateTime' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . base . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . base . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . base . path , 'DiagnosticReport.subject' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . definition , 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 6 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . path , 'DiagnosticReport.subject' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . short , 'The subject of the report' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . type [ 0 ] . code , 'Reference' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . type [ 0 ] . profile [ 0 ] , 'http://hl7.org/fhir/StructureDefinition/Patient' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . type [ 1 ] . code , 'Reference' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . type [ 1 ] . profile [ 0 ] , 'http://hl7.org/fhir/StructureDefinition/Group' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . type [ 2 ] . code , 'Reference' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 6 ] . type [ 2 ] . profile [ 0 ] , 'http://hl7.org/fhir/StructureDefinition/Device' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . base . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . base . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . base . path , 'DiagnosticReport.performer' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . comments , "This is not necessarily the source of the atomic data items - it's the entity that takes responsibility for the clinical report." ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . definition , 'The diagnostic service that is responsible for issuing the report.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 7 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . min , 1 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . path , 'DiagnosticReport.performer' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . short , 'Responsible Diagnostic Service' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . type [ 0 ] . code , 'Reference' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 7 ] . type [ 0 ] . profile [ 0 ] , 'http://hl7.org/fhir/StructureDefinition/Observation' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . base . max , '*' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . base . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . base . path , 'DiagnosticReport.identifier' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . definition , 'The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 8 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . max , '1' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . path , 'DiagnosticReport.identifier' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . short , 'Id for external references to this report' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 8 ] . type [ 0 ] . code , 'Identifier' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . base . max , '*' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . base . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . base . path , 'DiagnosticReport.request' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . definition , 'Details concerning a single pathology test requested.' ) #NEWLINE# self . assertFalse ( inst . snapshot . element [ 9 ] . isModifier ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . max , '*' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . min , 0 ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . path , 'DiagnosticReport.request' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . short , 'What was requested' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . type [ 0 ] . code , 'Reference' ) #NEWLINE# self . assertEqual ( inst . snapshot . element [ 9 ] . type [ 0 ] . profile [ 0 ] , 'http://hl7.org/fhir/StructureDefinition/DiagnosticOrder' ) #NEWLINE# self . assertEqual ( inst . status , 'draft' ) #NEWLINE# self . assertEqual ( inst . text . status , 'generated' ) #NEWLINE# self . assertEqual ( inst . url , 'http://hl7.org/fhir/StructureDefinition/example' ) #NEWLINE# self . assertEqual ( inst . useContext [ 0 ] . coding [ 0 ] . code , 'AU' ) #NEWLINE# self . assertEqual ( inst . useContext [ 0 ] . coding [ 0 ] . system , 'urn:iso:std:iso:3166' ) #NEWLINE# self . assertEqual ( inst . version , '2' )