Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file modified claimManagement/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
query GetClaims($claim_administrator_code: String, $status_claim: Int, $visit_date_from: Date, $visit_date_to: Date, $processed_date_from: Date, $processed_date_to: Date) {
query GetClaims($status_claim: Int, $visit_date_from: Date, $visit_date_to: Date, $processed_date_from: Date, $processed_date_to: Date) {
claims(
admin_Code: $claim_administrator_code
status: $status_claim
dateClaimed_Gte: $visit_date_from
dateClaimed_Lte: $visit_date_to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ private void getClaims(
new Thread(() -> {

try {
List<Claim> claims = new FetchClaims().execute(
claimAdministratorCode, status, visitDateFrom,
List<Claim> claims = new FetchClaims().execute( status, visitDateFrom,
visitDateTo, processedDateFrom, processedDateTo
);
pd.dismiss();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ protected Claim(Parcel in) {
if (in.readByte() == 0) {
status = null;
} else {
status = Claim.Status.valueOf(in.readString());
status = Status.valueOf(in.readString());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ public class GetClaimsGraphQLRequest extends BaseGraphQLRequest {
@NonNull
@WorkerThread
public GetClaimsQuery.Claims get(
@Nullable String claimAdministratorCode,
@Nullable Integer status,
@Nullable Date visitDateFrom,
@Nullable Date visitDateTo,
@Nullable Date processedDateFrom,
@Nullable Date processedDateTo
) throws Exception {
return makeSynchronous(new GetClaimsQuery(
Input.fromNullable(claimAdministratorCode),
Input.fromNullable(status),
Input.fromNullable(visitDateFrom),
Input.fromNullable(visitDateTo),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.openimis.imisclaims.Global;
import org.openimis.imisclaims.network.okhttp.AuthorizationInterceptor;

import java.util.concurrent.TimeUnit;

import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
Expand All @@ -29,6 +31,7 @@ public static OkHttpClient getDefaultOkHttpClient() {
synchronized (OkHttpUtils.class) {
if (client == null) {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.readTimeout(2000, TimeUnit.SECONDS);
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.BASIC);
builder.addInterceptor(interceptor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public FetchClaims(
@WorkerThread
@NonNull
public List<Claim> execute(
@Nullable String claimAdministratorCode,
@Nullable Claim.Status status,
@Nullable Date visitDateFrom,
@Nullable Date visitDateTo,
Expand All @@ -41,7 +40,6 @@ public List<Claim> execute(
Mapper<GetClaimsQuery.Service, Claim.Service> serviceMapper = new Mapper<>(this::toService);
Mapper<GetClaimsQuery.Item, Claim.Medication> medicationMapper = new Mapper<>(this::toMedication);
return Mapper.map(request.get(
claimAdministratorCode,
statusAsInt(status),
visitDateFrom,
visitDateTo,
Expand Down