@Test public void convertStatusActive() { Assert.assertEquals( CarePlan.CarePlanStatus.ACTIVE, transformer.convertStatus( EnrollmentStatus.ACTIVE ) ); }
@Nonnull protected CarePlan.CarePlanStatus convertStatus( @Nonnull EnrollmentStatus enrollmentStatus ) { switch ( enrollmentStatus ) { case ACTIVE: return CarePlan.CarePlanStatus.ACTIVE; case COMPLETED: return CarePlan.CarePlanStatus.COMPLETED; case CANCELLED: return CarePlan.CarePlanStatus.REVOKED; default: throw new AssertionError( "Invalid enrollment status: " + enrollmentStatus ); } }
R4EnrollmentToFhirCarePlanTransformer extends AbstractEnrollmentToFhirCarePlanTransformer { @Nonnull protected CarePlan.CarePlanStatus convertStatus( @Nonnull EnrollmentStatus enrollmentStatus ) { switch ( enrollmentStatus ) { case ACTIVE: return CarePlan.CarePlanStatus.ACTIVE; case COMPLETED: return CarePlan.CarePlanStatus.COMPLETED; case CANCELLED: return CarePlan.CarePlanStatus.REVOKED; default: throw new AssertionError( "Invalid enrollment status: " + enrollmentStatus ); } } }
R4EnrollmentToFhirCarePlanTransformer extends AbstractEnrollmentToFhirCarePlanTransformer { @Nonnull protected CarePlan.CarePlanStatus convertStatus( @Nonnull EnrollmentStatus enrollmentStatus ) { switch ( enrollmentStatus ) { case ACTIVE: return CarePlan.CarePlanStatus.ACTIVE; case COMPLETED: return CarePlan.CarePlanStatus.COMPLETED; case CANCELLED: return CarePlan.CarePlanStatus.REVOKED; default: throw new AssertionError( "Invalid enrollment status: " + enrollmentStatus ); } } R4EnrollmentToFhirCarePlanTransformer( @Nonnull ScriptExecutor scriptExecutor, @Nonnull LockManager lockManager, @Nonnull SystemRepository systemRepository, @Nonnull FhirResourceRepository fhirResourceRepository,
        @Nonnull FhirResourceMappingRepository resourceMappingRepository, @Nonnull FhirDhisAssignmentRepository fhirDhisAssignmentRepository, @Nonnull TrackedEntityMetadataService trackedEntityMetadataService,
        @Nonnull TrackedEntityRuleRepository trackedEntityRuleRepository, @Nonnull ProgramMetadataService programMetadataService ); }
R4EnrollmentToFhirCarePlanTransformer extends AbstractEnrollmentToFhirCarePlanTransformer { @Nonnull protected CarePlan.CarePlanStatus convertStatus( @Nonnull EnrollmentStatus enrollmentStatus ) { switch ( enrollmentStatus ) { case ACTIVE: return CarePlan.CarePlanStatus.ACTIVE; case COMPLETED: return CarePlan.CarePlanStatus.COMPLETED; case CANCELLED: return CarePlan.CarePlanStatus.REVOKED; default: throw new AssertionError( "Invalid enrollment status: " + enrollmentStatus ); } } R4EnrollmentToFhirCarePlanTransformer( @Nonnull ScriptExecutor scriptExecutor, @Nonnull LockManager lockManager, @Nonnull SystemRepository systemRepository, @Nonnull FhirResourceRepository fhirResourceRepository,
        @Nonnull FhirResourceMappingRepository resourceMappingRepository, @Nonnull FhirDhisAssignmentRepository fhirDhisAssignmentRepository, @Nonnull TrackedEntityMetadataService trackedEntityMetadataService,
        @Nonnull TrackedEntityRuleRepository trackedEntityRuleRepository, @Nonnull ProgramMetadataService programMetadataService ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); }
R4EnrollmentToFhirCarePlanTransformer extends AbstractEnrollmentToFhirCarePlanTransformer { @Nonnull protected CarePlan.CarePlanStatus convertStatus( @Nonnull EnrollmentStatus enrollmentStatus ) { switch ( enrollmentStatus ) { case ACTIVE: return CarePlan.CarePlanStatus.ACTIVE; case COMPLETED: return CarePlan.CarePlanStatus.COMPLETED; case CANCELLED: return CarePlan.CarePlanStatus.REVOKED; default: throw new AssertionError( "Invalid enrollment status: " + enrollmentStatus ); } } R4EnrollmentToFhirCarePlanTransformer( @Nonnull ScriptExecutor scriptExecutor, @Nonnull LockManager lockManager, @Nonnull SystemRepository systemRepository, @Nonnull FhirResourceRepository fhirResourceRepository,
        @Nonnull FhirResourceMappingRepository resourceMappingRepository, @Nonnull FhirDhisAssignmentRepository fhirDhisAssignmentRepository, @Nonnull TrackedEntityMetadataService trackedEntityMetadataService,
        @Nonnull TrackedEntityRuleRepository trackedEntityRuleRepository, @Nonnull ProgramMetadataService programMetadataService ); @Nonnull @Override Set<FhirVersion> getFhirVersions();  }