<s> import os <EOL> import io <EOL> import unittest <EOL> import json <EOL> from . import diagnosticreport <EOL> from . fhirdate import FHIRDate <EOL> class DiagnosticReportTests ( unittest . TestCase ) : <EOL> def instantiate_from ( self , filename ) : <EOL> datadir = os . environ . get ( '<STR_LIT>' ) or '<STR_LIT>' <EOL> with io . open ( os . path . join ( datadir , filename ) , '<STR_LIT:r>' , encoding = '<STR_LIT:utf-8>' ) as handle : <EOL> js = json . load ( handle ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> return diagnosticreport . DiagnosticReport ( js ) <EOL> def testDiagnosticReport1 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport1 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport1 ( inst2 ) <EOL> def implDiagnosticReport1 ( self , inst ) : <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . text , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:0> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testDiagnosticReport2 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport2 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport2 ( inst2 ) <EOL> def implDiagnosticReport2 ( self , inst ) : <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . conclusion , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:0> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . use , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testDiagnosticReport3 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport3 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport3 ( inst2 ) <EOL> def implDiagnosticReport3 ( self , inst ) : <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . text , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . conclusion , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testDiagnosticReport4 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport4 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport4 ( inst2 ) <EOL> def implDiagnosticReport4 ( self , inst ) : <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . codedDiagnosis [ <NUM_LIT:0> ] . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . conclusion , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:0> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testDiagnosticReport5 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport5 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport5 ( inst2 ) <EOL> def implDiagnosticReport5 ( self , inst ) : <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:0> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:1> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:2> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:3> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:4> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:5> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:6> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:7> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:8> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:9> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . meta . lastUpdated . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . meta . lastUpdated . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testDiagnosticReport6 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport6 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport6 ( inst2 ) <EOL> def implDiagnosticReport6 ( self , inst ) : <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . text , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:0> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:1> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:2> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:3> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testDiagnosticReport7 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport7 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport7 ( inst2 ) <EOL> def implDiagnosticReport7 ( self , inst ) : <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:1> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . text , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . conclusion , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . image [ <NUM_LIT:0> ] . comment , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testDiagnosticReport8 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implDiagnosticReport8 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = diagnosticreport . DiagnosticReport ( js ) <EOL> self . implDiagnosticReport8 ( inst2 ) <EOL> def implDiagnosticReport8 ( self , inst ) : <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . category . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:1> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:1> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . text , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:0> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:1> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:2> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:3> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:4> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:5> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:6> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:7> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:8> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . contained [ <NUM_LIT:9> ] . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . effectiveDateTime . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . effectiveDateTime . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . issued . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . issued . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . presentedForm [ <NUM_LIT:0> ] . contentType , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . presentedForm [ <NUM_LIT:0> ] . language , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . presentedForm [ <NUM_LIT:0> ] . title , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) </s>
