Skip to content

Commit

Permalink
#723 - minor text change
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed May 6, 2024
1 parent e61088d commit 16c9f9d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public PagedResources<Resource<EntityApprovalStatus>> getEntityApprovals(
@RequestParam(value = "entityType", required = false) SyncEntityName entityName,
@RequestParam(value = "entityTypeUuid", required = false) String entityTypeUuid,
Pageable pageable) {
if(entityName == null) {
if (entityName == null) {
return wrap(entityApprovalStatusRepository
.findByLastModifiedDateTimeIsBetweenOrderByLastModifiedDateTimeAscIdAsc(
CHSEntity.toDate(lastModifiedDateTime), CHSEntity.toDate(now), pageable));
Expand Down Expand Up @@ -112,15 +112,17 @@ public Resource<EntityApprovalStatus> process(Resource<EntityApprovalStatus> res

private String fetchSubjectTypeForEntityNameAndUuid(SyncEntityName entityName, String entityTypeUuid) {
switch (entityName) {
case Subject: return entityTypeUuid.isEmpty() ? null : entityTypeUuid;
case Subject:
return entityTypeUuid.isEmpty() ? null : entityTypeUuid;
case Encounter:
return getSubjectTypeUuidFromEncounterTypeUuid(entityTypeUuid, FormType.Encounter);
case ProgramEncounter:
return getSubjectTypeUuidFromEncounterTypeUuid(entityTypeUuid, FormType.ProgramEncounter);
case ProgramEnrolment:
case ChecklistItem:
return getSubjectTypeUuidFromProgramTypeUuid(entityTypeUuid, FormType.ProgramEnrolment);
default: return null;
default:
return null;
}
}

Expand Down
36 changes: 18 additions & 18 deletions avni-server-api/src/main/resources/api/external-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ paths:
schema:
type: string
nullable: true
enum: [Subject,ProgramEnrolment,ProgramEncounter,Encounter,ChecklistItem]
enum: [ Subject,ProgramEnrolment,ProgramEncounter,Encounter,ChecklistItem ]
- name: entityTypeId
in: query
description: "Allows filtering results by entity type id"
Expand Down Expand Up @@ -1870,13 +1870,13 @@ components:
properties:
Entity ID:
type: string
description: ID of the entity for which the approval status is being returned
description: ID of the entity for which the approval action was done.
Entity type:
type: string
description: Type of the entity for which the approval status is being returned i.e. Subject / Encounter etc
description: Type of the entity which the approval action was done.
Entity type ID:
type: string
description: ID of the entity type for which the approval status is being returned
description: ID of the entity type of the entity for which the approval action was done. This will be the ID of the subject type, program, or encounter type - for the entity for which approval action was taken.
Approval status:
type: string
description: Approval status for the entity
Expand Down Expand Up @@ -1925,18 +1925,18 @@ components:
- $ref: '#/components/schemas/Task'
- $ref: '#/components/schemas/TaskBody'
inline_response_200_locations:
properties:
content:
type: array
items:
$ref: '#/components/schemas/Location'
allOf:
- $ref: '#/components/schemas/ResponsePage'
properties:
content:
type: array
items:
$ref: '#/components/schemas/Location'
allOf:
- $ref: '#/components/schemas/ResponsePage'
inline_response_200_eas:
properties:
content:
type: array
items:
$ref: '#/components/schemas/EntityApprovalStatusBody'
allOf:
- $ref: '#/components/schemas/ResponsePage'
properties:
content:
type: array
items:
$ref: '#/components/schemas/EntityApprovalStatusBody'
allOf:
- $ref: '#/components/schemas/ResponsePage'

0 comments on commit 16c9f9d

Please sign in to comment.