Skip to content

Commit 8548063

Browse files
committed
merge main-csu
2 parents 758b146 + 678ef5d commit 8548063

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

claimManagement/src/main/graphql/org.openimis.imisclaim/schema.graphqls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5943,6 +5943,7 @@ input CreateClaimMutationInput {
59435943
items: [ClaimItemInputType]
59445944
services: [ClaimServiceInputType]
59455945
attachments: [ClaimAttachmentInputType]
5946+
source: String
59465947
clientMutationId: String
59475948
}
59485949

claimManagement/src/main/java/org/openimis/imisclaims/network/request/CreateClaimGraphQLRequest.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import okhttp3.Request;
2727
import okhttp3.RequestBody;
2828
import okhttp3.Response;
29+
import io.sentry.Sentry;
2930

3031
public class CreateClaimGraphQLRequest extends BaseGraphQLRequest{
3132

@@ -47,6 +48,10 @@ public String create(
4748
) throws Exception{
4849

4950
String clientMutationId = UUID.randomUUID().toString();
51+
52+
Sentry.captureMessage(
53+
"CreateClaimGraphQLRequest - clientMutationId generated: " + clientMutationId
54+
);
5055
String fagepFields = "";
5156
if(programCode.equals("PAL")){
5257
fagepFields = " testNumber: \"" + claim.getTestNumber() + "\""
@@ -139,6 +144,7 @@ public String create(
139144
+ " healthFacilityId: " + hfId
140145
+ " program: " + programId
141146
+ " visitType: \"" + claim.getVisitType() +"\""
147+
+ " source: \"MOB\" "
142148
+ fagepFields
143149
+ " services: " + claimServices
144150
+ " items: " + claimItems
@@ -195,7 +201,9 @@ public boolean verify(String hostname, SSLSession session) {
195201
.post(body)
196202
.build();
197203

198-
204+
Sentry.captureMessage(
205+
"CreateClaimGraphQLRequest - HTTP request prepared: " + URI + " - " + clientMutationId + " - " + json.toString()
206+
);
199207
Response response = httpClient.newCall(request).execute();
200208
int responseCode = response.code();
201209

@@ -204,6 +212,9 @@ public boolean verify(String hostname, SSLSession session) {
204212

205213
String responsePhrase = response.body().string();
206214
Log.i("RESPONSE", String.format("response: %d %s", responseCode, responsePhrase));
215+
Sentry.captureMessage(
216+
"CreateClaimGraphQLRequest - HTTP response received: " + responseCode + " - " + clientMutationId + " - " + responsePhrase
217+
);
207218

208219
return clientMutationId;
209220
}

0 commit comments

Comments
 (0)