Skip to content

Commit affcd88

Browse files
committed
Refactor variable names
1 parent b209ded commit affcd88

File tree

2 files changed

+10
-94
lines changed

2 files changed

+10
-94
lines changed

openmrs-client/.fuse_hidden00002d0700000001

Lines changed: 0 additions & 84 deletions
This file was deleted.

openmrs-client/src/main/java/org/openmrs/mobile/activities/RegisterPatientActivity.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
public class RegisterPatientActivity extends ACBaseActivity {
5353

54-
String locUUID;
54+
String initLocationUuid;
5555
String genId;
5656
ArrayList<String> idtypelist=new ArrayList<>();
5757

@@ -210,7 +210,7 @@ && isEmpty(edcountry) && isEmpty(edpostal))
210210
}
211211

212212

213-
void getlocuuid()
213+
void fetchLocationUuid()
214214
{
215215
RestApi apiService =
216216
ServiceGenerator.createService(RestApi.class);
@@ -221,24 +221,24 @@ public void onResponse(Call<Results<Resource>> call, Response<Results<Resource>>
221221
Results<Resource> locationList = response.body();
222222
for (Resource result : locationList.getResults()) {
223223
if ((result.getDisplay().trim()).equalsIgnoreCase((mOpenMRS.getLocation().trim()))) {
224-
locUUID = result.getUuid();
225-
getgenId();
224+
initLocationUuid = result.getUuid();
225+
initIdGenPatientIdentifier();
226226
}
227227
}
228228
}
229229

230230
@Override
231231
public void onFailure(Call<Results<Resource>> call, Throwable t) {
232232
Toast.makeText(RegisterPatientActivity.this,t.toString(),Toast.LENGTH_SHORT).show();
233-
locUUID ="";
233+
initLocationUuid ="";
234234
}
235235

236236
});
237237
}
238238

239239

240240

241-
void getgenId()
241+
void initIdGenPatientIdentifier()
242242
{
243243
String IDGEN_BASE_URL= mOpenMRS.getServerUrl()+'/';
244244
Retrofit retrofit = new Retrofit.Builder()
@@ -254,7 +254,7 @@ void getgenId()
254254
public void onResponse(Call<IdGenPatientIdentifiers> call, Response<IdGenPatientIdentifiers> response) {
255255
IdGenPatientIdentifiers idList = response.body();
256256
genId=idList.getIdentifiers().get(0);
257-
getidentifiertypeuuid();
257+
initPatientIdentifierTypeUuid();
258258

259259
}
260260

@@ -267,7 +267,7 @@ public void onFailure(Call<IdGenPatientIdentifiers> call, Throwable t) {
267267
}
268268

269269

270-
void getidentifiertypeuuid()
270+
void initPatientIdentifierTypeUuid()
271271
{
272272
RestApi apiService =
273273
ServiceGenerator.createService(RestApi.class);
@@ -294,7 +294,7 @@ public void onFailure(Call<Results<PatientIdentifier>> call, Throwable t) {
294294

295295
void registerpatient()
296296
{
297-
getlocuuid();
297+
fetchLocationUuid();
298298
}
299299

300300
void setPOSTpatient()
@@ -362,7 +362,7 @@ void setPOSTpatient()
362362
for (String idtype : idtypelist) {
363363
PatientIdentifier identifier=new PatientIdentifier();
364364
identifier.setIdentifier(genId);
365-
identifier.setLocation(locUUID);
365+
identifier.setLocation(initLocationUuid);
366366
identifier.setIdentifierType(idtype);
367367
identifiers.add(identifier);
368368

0 commit comments

Comments
 (0)