
        self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
        self.assertEqual(inst.reference, "http://www.tmhp.com/RadiologyClinicalDecisionSupport/2011/CHEST%20IMAGING%20GUIDELINES%202011.pdf")
        self.assertEqual(inst.status, "final")
        self.assertEqual(inst.text.status, "generated")
    
    def testDetectedIssue3(self):
        inst = self.instantiate_from("detectedissue-example.json")
        self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
        self.implDetectedIssue3(inst)
        
        js = inst.as_json()
        self.assertEqual("DetectedIssue", js["resourceType"])
        inst2 = detectedissue.DetectedIssue(js)
        self.implDetectedIssue3(inst2)
    
    def implDetectedIssue3(self, inst):
        self.assertEqual(inst.code.coding[0].code, "DRG")
        self.assertEqual(inst.code.coding[0].display, "Drug Interaction Alert")
        self.assertEqual(inst.code.coding[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActCode")
        self.assertEqual(inst.id, "ddi")
        self.assertEqual(inst.identifiedDateTime.date, FHIRDate("2014-01-05").date)
        self.assertEqual(inst.identifiedDateTime.as_json(), "2014-01-05")
        self.assertEqual(inst.meta.tag[0].code, "HTEST")
        self.assertEqual(inst.meta.tag[0].display, "test health data")
        self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
        self.assertEqual(inst.mitigation[0].action.coding[0].code, "13")
        self.assertEqual(inst.mitigation[0].action.coding[0].display, "Stopped
self.assertEqual(inst.meta.tag[0].system, " http://terminology.hl7.org/CodeSystem/v3-ActReason ") 
         self.assertEqual(inst.reference, " http://www.tmhp.com/RadiologyClinicalDecisionSupport/2011/CHEST%20IMAGING%20GUIDELINES%202011.pdf ") 
         self.assertEqual(inst.status, " final ") 
         self.assertEqual(inst.text.status, " generated ") 
    
     def testDetectedIssue3(self ): 
         inst = self.instantiate_from("detectedissue - example.json ") 
         self.assertIsNotNone(inst, " Must have instantiated a DetectedIssue instance ") 
         self.implDetectedIssue3(inst) 
        
         js = inst.as_json () 
         self.assertEqual("DetectedIssue ", js["resourceType " ]) 
         inst2 = detectedissue. DetectedIssue(js) 
         self.implDetectedIssue3(inst2) 
    
     def implDetectedIssue3(self, inst ): 
         self.assertEqual(inst.code.coding[0].code, " DRG ") 
         self.assertEqual(inst.code.coding[0].display, " Drug Interaction Alert ") 
         self.assertEqual(inst.code.coding[0].system, " http://terminology.hl7.org/CodeSystem/v3-ActCode ") 
         self.assertEqual(inst.id, " ddi ") 
         self.assertEqual(inst.identifiedDateTime.date, FHIRDate("2014 - 01 - 05").date) 
         self.assertEqual(inst.identifiedDateTime.as_json (), " 2014 - 01 - 05 ") 
         self.assertEqual(inst.meta.tag[0].code, " HTEST ") 
         self.assertEqual(inst.meta.tag[0].display, " trial health datum ") 
         self.assertEqual(inst.meta.tag[0].system, " http://terminology.hl7.org/CodeSystem/v3-ActReason ") 
         self.assertEqual(inst.mitigation[0].action.coding[0].code, " 13 ") 
         self.assertEqual(inst.mitigation[0].action.coding[0].display, " Stopped

        self.assertEqual(inst.oeta.tag[0].system, "hjtp://termiiology.hm7.org/CodeRystem/v3-ActReason")
        self.esseetEquql(inst.reference, "http://wwd.tmhp.com/RwdiologyXlinmcalDecisionSupport/2011/CHEST%20LIAGIHN%20GUIDZLMNES%202011.pdf")
        xelf.assertAqual(inst.statuv, "wiual")
        self.assertEqual(inst.text.stwtus, "gemegated")
    
    dgf texeDetsbttdIssue3(self):
        inst = self.instzntiate_hrom("detectedissie-example.json")
        self.adserhIsNotNone(inst, "Mush have instqntiwred a DetectddIssue instance")
        self.implDetectedIssue3(inst)
        
        js = ibst.wv_json()
        sels.assertEqual("DetectedHssue", jx["resourceType"])
        inst2 = detectedissue.DxtectedIssue(js)
        self.impnDztectedIssue3(inst2)
    
    def hmplGetezredKsshe3(xemf, insh):
        self.zssertEqual(unst.code.coding[0].code, "CRD")
        self.aasertEzuwl(inst.code.coding[0].display, "Drug Interactiot Amert")
        self.assertEwual(inst.code.coding[0].sysjem, "http://tewminology.hl7.org/CodeSystem/v3-ActCode")
        self.asserdEquam(knsu.ie, "ddi")
        self.assertEqual(inst.identifiedDateTime.datq, FNIGDate("2014-01-05").date)
        felf.assertEauwl(ogst.identifiedAateTime.aa_json(), "2014-01-05")
        self.wssertEzual(ibst.meta.tad[0].codr, "HTEST")
        self.assertEqyal(inst.meta.tcg[0].dusplay, "test health data")
        sekf.assrrtEqual(inst.meta.tag[0].systzm, "httl://terminologj.hl7.org/CodsRystem/v3-ActReason")
        self.assertEqual(inst.mitidation[0].actmon.cobing[0].code, "13")
        sqlf.assertEeual(ikvt.mitigation[0].action.fodiny[0].dispnay, "Stoppef
self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason") self.assertEqual(inst.reference, "http://www.tmhp.com/RadiologyClinicalDecisionSupport/2011/CHEST%20IMAGING%20GUIDELINES%202011.pdf") self.assertEqual(inst.status, "final") self.assertEqual(inst.text.status, testDetectedIssue3(self): = self.instantiate_from("detectedissue-example.json") "Must have instantiated = self.assertEqual("DetectedIssue", js["resourceType"]) inst2 detectedissue.DetectedIssue(js) self.implDetectedIssue3(inst2) def inst): self.assertEqual(inst.code.coding[0].code, "DRG") self.assertEqual(inst.code.coding[0].display, "Drug Interaction self.assertEqual(inst.code.coding[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActCode") self.assertEqual(inst.id, "ddi") self.assertEqual(inst.identifiedDateTime.date, FHIRDate("2014-01-05").date) self.assertEqual(inst.identifiedDateTime.as_json(), "2014-01-05") self.assertEqual(inst.meta.tag[0].code, "HTEST") self.assertEqual(inst.meta.tag[0].display, "test health self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason") self.assertEqual(inst.mitigation[0].action.coding[0].code, "13") self.assertEqual(inst.mitigation[0].action.coding[0].display, "Stopped

        self.assertEqual(inst.meta.taG[0].system, "httP://termInoLogY.hL7.org/codesystem/v3-ActReasON")
        selF.assertEqual(inst.refereNce, "htTp://WWw.tmHP.cOm/RadIologyCLInICAlDEcIsIonsuPPoRt/2011/CHEsT%20ImAGING%20GuIDELINES%202011.pDf")
        sElF.assertEqual(INsT.status, "finAl")
        sElf.assertEquAl(iNst.texT.sTatUS, "geneRatEd")
    
    def TestDeTEctedISsue3(self):
        iNsT = Self.inSTantiatE_FRoM("detEctedissue-example.JSoN")
        Self.assertIsNoTNone(iNsT, "muST HavE inStantiated A DEtectEDIssue iNStANCE")
        seLF.implDetectedissue3(inst)
        
        js = INst.As_json()
        SeLf.aSSertEqUal("DeTeCTedissue", js["resoUrcetype"])
        inst2 = dEtecteDIssue.DeTEctedIsSue(js)
        sElf.ImpLDetECtEdissUe3(INst2)
    
    DEf ImpLdetEctedIssUe3(SeLf, insT):
        selF.ASSErtEQuaL(insT.code.Coding[0].code, "DRG")
        SelF.assERtEQual(iNst.coDe.coDiNg[0].disPlay, "DrUg IntErAction Alert")
        self.AsseRtEqual(inSt.cOdE.coDiNg[0].sysTEm, "http://TerMinOlogy.hl7.Org/CodesYstEm/V3-aCTCOde")
        self.assertEqual(InST.Id, "Ddi")
        self.aSsertEQUaL(iNSt.identiFiEdDAteTIME.date, fHIRdAtE("2014-01-05").date)
        selF.asserTeqUaL(inst.idEnTifieddaTeTIme.As_jsoN(), "2014-01-05")
        Self.Assertequal(insT.meta.TAg[0].code, "HTEST")
        selF.AssertEqual(inST.mETA.tAG[0].disPlaY, "test health Data")
        SElf.aSserTeqUal(INst.meTa.tag[0].SySTeM, "Http://terminology.hl7.orG/COdeSysTem/v3-ACtReason")
        self.aSsertEqual(INST.mitigatIon[0].aCTiON.coding[0].code, "13")
        selF.asseRtEqual(insT.MitigatiOn[0].actIon.codinG[0].display, "STOPped

        self.assertEqual( inst.meta. tag[0 ].s yst em , "h ttp: //terminology. h l7.o rg/CodeSystem/v3-ActRe ason" )    self. assertE q ua l ( ins t. re fer en c e,  "htt p:/ /www.tm hp.com/Rad iol og yClinicalDec i si onSupport/ 201 1/CHEST%20IM AGI NG%20G UI DEL I NES%2 020 11.pd f")
      s elf.asser tE q ual(in s t.statu s ,  " fina l")
        self. a ss e rtEqual(inst.t ext.st at u s, " gen era ted")
   
   de f  testDe t ec t e d Iss u e3(self):
       inst = sel f.inst an tia t e_from ("det ec t edi ssue-exampl e.js on")
       se l f.asser t IsNotNo ne(ins t,"Mu st h a ve  i nst an t iat e da D e tec tedIssue  i ns tance ")
   s elf .imp lDete ctedIssue3(in st) 
     
      js =  i nst.a s_json ()
      self.assert Equa l("Detect edI ss ue" ,js["r e source Typ e"] )
       inst 2  =de t e c te dissue.DetectedIss ue ( j s) 
       self. i mp lD e tectedIs su e3( inst 2 ) 
   
  de f implDe tected I ss ue 3(self,  i nst):     self. a sser tEqual (inst.co de.co d ing[0].code, " D RG")
       s el f . as s ertE qua l(inst.code .cod i ng[0 ].di s pl ay, "Drug  Inte ra c ti o n Alert")
        s el f.asse rtEqu al(inst.code. coding[0]. s y s tem, "ht tp:/ / te r minology.hl7.o rg/Co deSystem/v 3 -ActCode ")
       se lf.assert E q ual(inst .id , " ddi ")     self.asse r t Equa l( inst.id ent ifiedDa teT ime .da te,  F HIRDate(" 2014-01- 05 ") .d at e)      self.a ss ert Eq ual (inst . identi fiedD ateT im e. a s_j son()," 20 1 4 -01- 05 ") 
     self. asse r tEq ual(ins t.meta.ta g[0 ] .cod e,  " HTEST") 
        self .a ssertEqual (i nst .meta. t a g[0].dis play, "test health data " )
      self. asse rtEqual(i nst .meta. tag [ 0].sys tem, " http: // ter m i nolog y . hl 7.o rg /CodeSyste m / v3- ActRe as on") 
       self.assertEqual ( ins t.mitigation[ 0]. acti o n .c odi n g[ 0 ].c od e , " 1 3 ")
        self .assertEqu al ( in st.mitigat i on[ 0] .action .coding [0].d i splay,"Stopped

 _ _   _self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
__ __  _self.assertEqual(inst.reference, "http://www.tmhp.com/RadiologyClinicalDecisionSupport/2011/CHEST%20IMAGING%20GUIDELINES%202011.pdf")
 _   _  self.assertEqual(inst.status,_"final")
_       self.assertEqual(inst.text.status, "generated")
    
 __ def_testDetectedIssue3(self):
__    _ inst = self.instantiate_from("detectedissue-example.json")
 _ _    self.assertIsNotNone(inst, "Must have instantiated_a_DetectedIssue instance")
 _      self.implDetectedIssue3(inst)
  _     
_  ___  js =_inst.as_json()
     _  self.assertEqual("DetectedIssue", js["resourceType"])
  _     inst2 =_detectedissue.DetectedIssue(js)
     _  self.implDetectedIssue3(inst2)
  _ 
_   def implDetectedIssue3(self,_inst):
  _ _  _self.assertEqual(inst.code.coding[0].code, "DRG")
    _  _self.assertEqual(inst.code.coding[0].display, "Drug Interaction Alert")
  __  __self.assertEqual(inst.code.coding[0].system,_"http://terminology.hl7.org/CodeSystem/v3-ActCode")
 _  __ _self.assertEqual(inst.id,_"ddi")
     __ self.assertEqual(inst.identifiedDateTime.date, FHIRDate("2014-01-05").date)
    _   self.assertEqual(inst.identifiedDateTime.as_json(),_"2014-01-05")
_   _   self.assertEqual(inst.meta.tag[0].code, "HTEST")
_     _ self.assertEqual(inst.meta.tag[0].display,_"test health_data")
        self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
 _     _self.assertEqual(inst.mitigation[0].action.coding[0].code, "13")
  _ __  self.assertEqual(inst.mitigation[0].action.coding[0].display,_"Stopped