51
51
52
52
public class RegisterPatientActivity extends ACBaseActivity {
53
53
54
- String locUUID ;
54
+ String initLocationUuid ;
55
55
String genId ;
56
56
ArrayList <String > idtypelist =new ArrayList <>();
57
57
@@ -210,7 +210,7 @@ && isEmpty(edcountry) && isEmpty(edpostal))
210
210
}
211
211
212
212
213
- void getlocuuid ()
213
+ void fetchLocationUuid ()
214
214
{
215
215
RestApi apiService =
216
216
ServiceGenerator .createService (RestApi .class );
@@ -221,24 +221,24 @@ public void onResponse(Call<Results<Resource>> call, Response<Results<Resource>>
221
221
Results <Resource > locationList = response .body ();
222
222
for (Resource result : locationList .getResults ()) {
223
223
if ((result .getDisplay ().trim ()).equalsIgnoreCase ((mOpenMRS .getLocation ().trim ()))) {
224
- locUUID = result .getUuid ();
225
- getgenId ();
224
+ initLocationUuid = result .getUuid ();
225
+ initIdGenPatientIdentifier ();
226
226
}
227
227
}
228
228
}
229
229
230
230
@ Override
231
231
public void onFailure (Call <Results <Resource >> call , Throwable t ) {
232
232
Toast .makeText (RegisterPatientActivity .this ,t .toString (),Toast .LENGTH_SHORT ).show ();
233
- locUUID ="" ;
233
+ initLocationUuid ="" ;
234
234
}
235
235
236
236
});
237
237
}
238
238
239
239
240
240
241
- void getgenId ()
241
+ void initIdGenPatientIdentifier ()
242
242
{
243
243
String IDGEN_BASE_URL = mOpenMRS .getServerUrl ()+'/' ;
244
244
Retrofit retrofit = new Retrofit .Builder ()
@@ -254,7 +254,7 @@ void getgenId()
254
254
public void onResponse (Call <IdGenPatientIdentifiers > call , Response <IdGenPatientIdentifiers > response ) {
255
255
IdGenPatientIdentifiers idList = response .body ();
256
256
genId =idList .getIdentifiers ().get (0 );
257
- getidentifiertypeuuid ();
257
+ initPatientIdentifierTypeUuid ();
258
258
259
259
}
260
260
@@ -267,7 +267,7 @@ public void onFailure(Call<IdGenPatientIdentifiers> call, Throwable t) {
267
267
}
268
268
269
269
270
- void getidentifiertypeuuid ()
270
+ void initPatientIdentifierTypeUuid ()
271
271
{
272
272
RestApi apiService =
273
273
ServiceGenerator .createService (RestApi .class );
@@ -294,7 +294,7 @@ public void onFailure(Call<Results<PatientIdentifier>> call, Throwable t) {
294
294
295
295
void registerpatient ()
296
296
{
297
- getlocuuid ();
297
+ fetchLocationUuid ();
298
298
}
299
299
300
300
void setPOSTpatient ()
@@ -362,7 +362,7 @@ void setPOSTpatient()
362
362
for (String idtype : idtypelist ) {
363
363
PatientIdentifier identifier =new PatientIdentifier ();
364
364
identifier .setIdentifier (genId );
365
- identifier .setLocation (locUUID );
365
+ identifier .setLocation (initLocationUuid );
366
366
identifier .setIdentifierType (idtype );
367
367
identifiers .add (identifier );
368
368
0 commit comments