@Test public void containsCodeNot() { final CodeableConcept codeableConcept = new CodeableConcept(); codeableConcept.addCoding( new Coding().setSystem( "http: .addCoding( new Coding().setSystem( "http: Assert.assertFalse( utils.containsCode( codeableConcept, "http: }
@Override public boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code ) { if ( codeableConcept == null ) { return false; } return ((CodeableConcept) codeableConcept).getCoding().stream().anyMatch( coding -> Objects.equals( system, coding.getSystem() ) && code.equals( coding.getCode() ) ); }
Dstu3CodeFhirToDhisTransformerUtils extends AbstractCodeFhirToDhisTransformerUtils { @Override public boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code ) { if ( codeableConcept == null ) { return false; } return ((CodeableConcept) codeableConcept).getCoding().stream().anyMatch( coding -> Objects.equals( system, coding.getSystem() ) && code.equals( coding.getCode() ) ); } }
Dstu3CodeFhirToDhisTransformerUtils extends AbstractCodeFhirToDhisTransformerUtils { @Override public boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code ) { if ( codeableConcept == null ) { return false; } return ((CodeableConcept) codeableConcept).getCoding().stream().anyMatch( coding -> Objects.equals( system, coding.getSystem() ) && code.equals( coding.getCode() ) ); } Dstu3CodeFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext,
        @Nonnull CodeRepository codeRepository,
        @Nonnull SystemCodeRepository systemCodeRepository ); }
Dstu3CodeFhirToDhisTransformerUtils extends AbstractCodeFhirToDhisTransformerUtils { @Override public boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code ) { if ( codeableConcept == null ) { return false; } return ((CodeableConcept) codeableConcept).getCoding().stream().anyMatch( coding -> Objects.equals( system, coding.getSystem() ) && code.equals( coding.getCode() ) ); } Dstu3CodeFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext,
        @Nonnull CodeRepository codeRepository,
        @Nonnull SystemCodeRepository systemCodeRepository ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override List<SystemCodeValue> getSystemCodeValues( @Nullable ICompositeType codeableConcept ); @Override @Nullable String getCode( @Nullable ICompositeType codeableConcept, @Nullable String system ); @Override boolean containsMappingCode( @Nullable ICompositeType codeableConcept, @Nullable Object mappingCodes ); @Override boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code ); }
Dstu3CodeFhirToDhisTransformerUtils extends AbstractCodeFhirToDhisTransformerUtils { @Override public boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code ) { if ( codeableConcept == null ) { return false; } return ((CodeableConcept) codeableConcept).getCoding().stream().anyMatch( coding -> Objects.equals( system, coding.getSystem() ) && code.equals( coding.getCode() ) ); } Dstu3CodeFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext,
        @Nonnull CodeRepository codeRepository,
        @Nonnull SystemCodeRepository systemCodeRepository ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override List<SystemCodeValue> getSystemCodeValues( @Nullable ICompositeType codeableConcept ); @Override @Nullable String getCode( @Nullable ICompositeType codeableConcept, @Nullable String system ); @Override boolean containsMappingCode( @Nullable ICompositeType codeableConcept, @Nullable Object mappingCodes ); @Override boolean containsCode( @Nullable ICompositeType codeableConcept, @Nullable String system, @Nonnull String code );  }