@Test public void shouldPassIfBuildEffectiveTimeinIVLIsCalledBothValues() { IVL_TS time=CDAHelper.buildEffectiveTimeinIVL(new Date(), new Date()); IVXB_TS low=time.getLow(); IVXB_TS high=time.getHigh(); String value=low.getValue(); String value1=high.getValue(); Assert.assertNotNull(value); Assert.assertNotNull(value1); }
public static IVL_TS buildEffectiveTimeinIVL(Date d , Date d1) { IVL_TS effectiveTime = DatatypesFactory.eINSTANCE.createIVL_TS(); SimpleDateFormat s = new SimpleDateFormat("yyyyMMddhhmmss"); String creationDate; IVXB_TS low = DatatypesFactory.eINSTANCE.createIVXB_TS(); IVXB_TS high = DatatypesFactory.eINSTANCE.createIVXB_TS(); if(d!=null) { creationDate = s.format(d); low.setValue(creationDate); } else low.setNullFlavor(NullFlavor.UNK); effectiveTime.setLow(low); if(d1!=null) { high.setValue(s.format(d1)); } else high.setNullFlavor(NullFlavor.UNK); effectiveTime.setHigh(high); return effectiveTime; }
CDAHelper { public static IVL_TS buildEffectiveTimeinIVL(Date d , Date d1) { IVL_TS effectiveTime = DatatypesFactory.eINSTANCE.createIVL_TS(); SimpleDateFormat s = new SimpleDateFormat("yyyyMMddhhmmss"); String creationDate; IVXB_TS low = DatatypesFactory.eINSTANCE.createIVXB_TS(); IVXB_TS high = DatatypesFactory.eINSTANCE.createIVXB_TS(); if(d!=null) { creationDate = s.format(d); low.setValue(creationDate); } else low.setNullFlavor(NullFlavor.UNK); effectiveTime.setLow(low); if(d1!=null) { high.setValue(s.format(d1)); } else high.setNullFlavor(NullFlavor.UNK); effectiveTime.setHigh(high); return effectiveTime; } }
CDAHelper { public static IVL_TS buildEffectiveTimeinIVL(Date d , Date d1) { IVL_TS effectiveTime = DatatypesFactory.eINSTANCE.createIVL_TS(); SimpleDateFormat s = new SimpleDateFormat("yyyyMMddhhmmss"); String creationDate; IVXB_TS low = DatatypesFactory.eINSTANCE.createIVXB_TS(); IVXB_TS high = DatatypesFactory.eINSTANCE.createIVXB_TS(); if(d!=null) { creationDate = s.format(d); low.setValue(creationDate); } else low.setNullFlavor(NullFlavor.UNK); effectiveTime.setLow(low); if(d1!=null) { high.setValue(s.format(d1)); } else high.setNullFlavor(NullFlavor.UNK); effectiveTime.setHigh(high); return effectiveTime; }  }
CDAHelper { public static IVL_TS buildEffectiveTimeinIVL(Date d , Date d1) { IVL_TS effectiveTime = DatatypesFactory.eINSTANCE.createIVL_TS(); SimpleDateFormat s = new SimpleDateFormat("yyyyMMddhhmmss"); String creationDate; IVXB_TS low = DatatypesFactory.eINSTANCE.createIVXB_TS(); IVXB_TS high = DatatypesFactory.eINSTANCE.createIVXB_TS(); if(d!=null) { creationDate = s.format(d); low.setValue(creationDate); } else low.setNullFlavor(NullFlavor.UNK); effectiveTime.setLow(low); if(d1!=null) { high.setValue(s.format(d1)); } else high.setNullFlavor(NullFlavor.UNK); effectiveTime.setHigh(high); return effectiveTime; }  static SimpleDateFormat getDateFormat(); static IVL_TS buildEffectiveTimeinIVL(Date d , Date d1); static IVL_TS buildEffectiveTimeinIVL(Date d); static II buildTemplateID(String root , String extension ,String assigningAuthorityName); static ST buildTitle(String title); static II buildID(String root , String extension); static CE buildCodeCE(String code , String codeSystem, String displayString, String codeSystemName); static CD buildCodeCD(String code , String codeSystem, String displayString, String codeSystemName); static TS buildEffectiveTime(Date d); static ED buildEDText(String value); static String getDatatypesValue(Integer datatypeId,Obs obs); static Obs getLatestObs(List<Obs> observationList); static CS getStatusCode(String statusCode); static IVL_TS buildDateTime(Date date); static String getCodeSystemByName(String codeSystemName); static String removeDirtyValue(String input); static String getUnitsaccordingto_Tf_PCC(String unit); static String getConceptIdasString(int conceptId); }
CDAHelper { public static IVL_TS buildEffectiveTimeinIVL(Date d , Date d1) { IVL_TS effectiveTime = DatatypesFactory.eINSTANCE.createIVL_TS(); SimpleDateFormat s = new SimpleDateFormat("yyyyMMddhhmmss"); String creationDate; IVXB_TS low = DatatypesFactory.eINSTANCE.createIVXB_TS(); IVXB_TS high = DatatypesFactory.eINSTANCE.createIVXB_TS(); if(d!=null) { creationDate = s.format(d); low.setValue(creationDate); } else low.setNullFlavor(NullFlavor.UNK); effectiveTime.setLow(low); if(d1!=null) { high.setValue(s.format(d1)); } else high.setNullFlavor(NullFlavor.UNK); effectiveTime.setHigh(high); return effectiveTime; }  static SimpleDateFormat getDateFormat(); static IVL_TS buildEffectiveTimeinIVL(Date d , Date d1); static IVL_TS buildEffectiveTimeinIVL(Date d); static II buildTemplateID(String root , String extension ,String assigningAuthorityName); static ST buildTitle(String title); static II buildID(String root , String extension); static CE buildCodeCE(String code , String codeSystem, String displayString, String codeSystemName); static CD buildCodeCD(String code , String codeSystem, String displayString, String codeSystemName); static TS buildEffectiveTime(Date d); static ED buildEDText(String value); static String getDatatypesValue(Integer datatypeId,Obs obs); static Obs getLatestObs(List<Obs> observationList); static CS getStatusCode(String statusCode); static IVL_TS buildDateTime(Date date); static String getCodeSystemByName(String codeSystemName); static String removeDirtyValue(String input); static String getUnitsaccordingto_Tf_PCC(String unit); static String getConceptIdasString(int conceptId);  }