Skip to content

Commit

Permalink
#714 - provide location uuid in subject response
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels authored and 1t5j0y committed Apr 15, 2024
1 parent 498fde8 commit a7da59b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ private static void putLocation(Individual subject, SubjectResponse subjectRespo
addressLevel = addressLevel.getParent();
}
subjectResponse.put("location", location);
if (subject.getAddressLevel() != null)
subjectResponse.put("Location ID", subject.getAddressLevel().getUuid());
}

private static void putCatchments(Individual subject, SubjectResponse subjectResponse) {
Expand Down
8 changes: 8 additions & 0 deletions avni-server-api/src/main/resources/api/external-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,10 @@ components:
type: string
description: "full hierarchy of location is provided, each one as key-value pair"
example: "{\"Village\": \"Ganks\", \"Block\": \"Ynaos\"}"
Location ID:
type: string
format: uuid
description: Unique identifier of the lowest location/address at which the subject is registered
relatives:
type: array
items:
Expand Down Expand Up @@ -1319,6 +1323,10 @@ components:
type: string
description: Complete address of the subject
example: "India, Uttarakhand, Dehradun"
Location ID:
type: string
format: uuid
description: Unique identifier of the lowest location/address at which the subject is registered
Date of birth:
type: string
description: Applicable only for Person type subject
Expand Down

0 comments on commit a7da59b

Please sign in to comment.