-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yaml
823 lines (823 loc) · 32.9 KB
/
api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
openapi: 3.0.0
# Gunak Platform API
servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/samanvay/gunak/1.0.0
- description: Production server (live data)
url: https://gunak.nhsrcindia.org/api
info:
description: This is API documentation for Gunak Platform. Sample client codes can be generated from [here](https://documenter.getpostman.com/view/695405/S1EUubE9).
version: "1.0.0"
title: Gunak Platform
# termsOfService: 'http://swagger.io/terms/'
contact:
email: [email protected]
license:
name: AGPL 3.0
url: 'https://opensource.org/licenses/AGPL-3.0'
tags:
- name: Login
description: Before accessing the API to get the assessment data the api should login. Gunak uses cookie based session management.
- name: AssessmentTool
description: For doing the assessment an assessment tool is used. A program can have one or more assessment tools. An example is - Program = 'Laqshya', Assessment tool = 'NQAS', 'Laqshya Monthly', 'Laqshya Baseline'. Assessment tool consists of one or more checklists or set of indicators depending on the type of assessment tool (COMPLIANCE or INDICATOR). Using the same example - NQAS, which is of type COMPLIANCE, has 'OT' and 'Labour Room' checklists.
- name: Assessment
description: There are three key aspects of an assessment for an API user - Facility, Assessment Tool and Assessment Instance. An assessment is done for a facility. For doing the assessment an assessment tool is used. A single instance of assessment could be divided among more than one assessor. For example - one assessor could do 'OT' and other one could do 'Labour Room'. When the assessors use single series name from the app, Gunak collects them into a single assessment.
paths:
/login:
post:
tags:
- Login
summary: Some of API methods may be protected, hence the caller must login before calling those APIs.
description: Post the login details to the server to obtain a valid cookie by name JSESSIONID. Include this cookie in other API calls that are protected.
responses:
'200':
description: Successful login
'401':
description: Login failed, email and password combination incorrect
'default':
$ref: '#/components/responses/APIError'
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
email:
type: string
format: email
password:
type: string
required:
- email
- password
/ext/assessmentType:
get:
tags:
- Assessment Type
summary: Get a list of assessment types.
description: Get a list of assessment types updated after a given date. Each assessment type has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all assessment type updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/AssessmentType'
'default':
$ref: '#/components/responses/APIError'
/ext/program:
get:
tags:
- Program
summary: Get a list of programs.
description: Get a list of programs updated after a given date. Each program has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all programs updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/Program'
'default':
$ref: '#/components/responses/APIError'
/ext/assessmentTool:
get:
tags:
- AssessmentTool
summary: Get a list of assessment tools.
description: Get a list of assessment tools updated after a given date. Each Assessment tool has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all assessment tools updated after that time (excluding the exact match). To get universal assessment tools do not pass the stateName.
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/AssessmentTool'
'default':
$ref: '#/components/responses/APIError'
/ext/checklist:
get:
tags:
- Checklist
summary: Get a list of checklists.
description: Get a list of checklists updated after a given date. Each checklist has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all checklists updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/Checklist'
'default':
$ref: '#/components/responses/APIError'
/ext/areaOfConcern:
get:
tags:
- Area of concern
summary: Get a list of area of concerns.
description: Get a list of area of concerns updated after a given date. Each area of concerns has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all area of concerns updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/AreaOfConcern'
'default':
$ref: '#/components/responses/APIError'
/ext/standard:
get:
tags:
- Standard
summary: Get a list of standards.
description: Get a list of standards updated after a given date. Each standard has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all standards updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/Standard'
'default':
$ref: '#/components/responses/APIError'
/ext/measurableElement:
get:
tags:
- Measurable Element
summary: Get a list of measurable elements.
description: Get a list of measurable elements updated after a given date. Each measurable element has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all measurable elements updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/MeasurableElement'
'default':
$ref: '#/components/responses/APIError'
/ext/checkpoint:
get:
tags:
- Checkpoint
summary: Get a list of checkpoints.
description: Get a list of checkpoints updated after a given date. Each checkpoint has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all checkpoints updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/Checkpoint'
'default':
$ref: '#/components/responses/APIError'
/ext/indicatorDefinition:
get:
tags:
- Indicator Definition
summary: Get a list of indicator definitions.
description: Get a list of indicator definitions updated after a given date. Each indicator definition has a last modified date on which it was last changed. Depending on the date-time value passed the API will return a list of all indicator definitions updated after that time (excluding the exact match).
parameters:
- name: fromDate
in: query
description: Timestamp (date and time) value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/IndicatorDefinition'
'default':
$ref: '#/components/responses/APIError'
/ext/assessmentSummary:
get:
tags:
- Assessment
security:
- cookieAuth: []
summary: Get facility assessments after the given date-time.
description: Get a list of facility assessments completed after a date. Each Assessment has an assessment date on which it was submitted to the system. Depending on the date-time value passed the API will return a paged list of all assessments submitted after that time (excluding the exact match). You can change the page number to access subsequent pages of response or (not and) you can provide the assessmentEndDateTime as the last summary resource's assessmentEndDateTime value.
parameters:
- name: assessmentEndDateTime
in: query
description: Timestamp (date and time) value. The assessments returned will be all have assessmentEndDateTime on or after this value. The datetime value should be specified in the following format - yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. "2000-10-31T01:30:00.000Z".
required: true
schema:
type: string
format: date-time
- name: assessmentTool
in: query
description: System id of the assessment tool
required: true
schema:
type: string
- name: assessmentType
in: query
description: System id of assessment type (use this to filter assessments)
required: false
schema:
type: string
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/pageSizeParam"
responses:
'200':
description: successful operation
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PageDetails'
properties:
content:
type: array
items:
$ref: '#/components/schemas/AssessmentSummary'
'default':
$ref: '#/components/responses/APIError'
/ext/assessment/{systemId}:
get:
tags:
- Assessment
security:
- cookieAuth: []
summary: Get all checkpoint scores or indicators of an assessment (depending on the setup of the assessment tool)
description: Each assessment has a globally unique systemId which identifies an assessment. This systemId can be retrieved from the assessment listing api call. While example displays both checklists and indicators within the same assessment, in reality the assessment tools are not setup like that.
parameters:
- name: systemId
in: path
required: true
schema:
type: string
format: string
example: 'bf29ff04-774b-4f38-bc20-ed98de4d8918'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Assessment'
default:
$ref: '#/components/responses/APIError'
components:
securitySchemes:
cookieAuth:
type: apiKey
in: cookie
name: JSESSIONID
parameters:
pageParam:
name: page
in: query
required: false
description: Page number, starts with 0 which can be incremented to get subsequent page numbers. Please also see the response fields about page number of the response and total number or pages available.
schema:
type: integer
default: 0
pageSizeParam:
name: size
in: query
required: false
description: Number of resources to include in a page
schema:
type: integer
default: 25
responses:
APIError:
description: Gunak uses standard <a href="https://www.restapitutorial.com/httpstatuscodes.html" target="_blank">HTTP Status Codes</a> for communicating about various error codes. In the API error response please check the status code. Apart from the standard error, API error contains application specific error messages as well.
content:
application/json:
schema:
$ref: '#/components/schemas/APIError'
schemas:
APIError:
type: object
properties:
httpStatusCode:
type: integer
example: 405
description: For reference - <a href="https://www.restapitutorial.com/httpstatuscodes.html" target="_blank">HTTP Status Codes</a>
errorMessage:
type: string
description: Detailed error message which provides further details. In case of Internal Server Error (500), please report the error to support.
PageDetails:
type: object
description: Used when the number of resources in the response is large and cannot be sent in one response to the called. In such a case the results are returned in multiple pages. Along with the resources, PageDetails is part of response providing information to the user to navigate through all the pages to fetch all the resources. For the example - Assume there are 89 resources. Each page size is of 20 resources. Total number of pages = 89/20 = 5 (rounded up). Currently in page number 2 (0 based).
properties:
totalPages:
type: integer
description: Total number of pages of response
example: 5
last:
type: boolean
description: Is this the last page?
example: false
totalElements:
type: integer
description: Total number of resources in all the pages put together
example: 89
size:
type: integer
description: Maximum number of elements in a page
example: 20
number:
type: integer
description: The current page number (starts from 0, upto totalPages - 1)
example: 2
numberOfElements:
type: integer
description: Number of elements in the current page
example: 20
AssessmentSummary:
type: object
properties:
systemId:
type: string
example: '93885199-c27b-4c56-97f8-11717548a863'
program:
type: string
example: 'bfb263a8-a2f4-4793-bb4f-f6819352f2db'
assessmentTool:
type: string
example: 'd91d760c-f93f-4e46-be62-bb27d64415ab'
assessmentType:
type: string
example: 'd91d760c-f93f-4e46-be62-bb27d64415ab'
assessmentSeries:
type: string
example: '20190210'
assessmentStartDate:
type: string
format: date-time
example: '2019-03-18T06:38:03.292Z'
assessmentEndDate:
type: string
format: date-time
example: '2019-03-18T10:38:03.292Z'
state:
type: string
example: 'Chhattisgarh'
district:
type: string
example: 'Bilaspur'
facility:
type: string
example: 'Bilaspur DH'
facilityType:
type: string
enum:
- 100-500 Bedded Hospital
- <100 Bedded Hospital
- ">500 Bedded Hospital"
- Ayush Dispensaries
- Civil Hospital/General Hospital
- Community Health Center
- Dispensaries
- District Hospital
- H & W C
- Health and Wellness Centre
- M&CW Center
- Maternity Home
- Medical Colleges Hospital
- Others
- Primary Health Centre
- Referral Hospital
- Sub-District Hospital
- SubCentre
- Urban Health Centre
- Urban Health Posts
- Women Hospital
facilityNIN:
type: string
example: 1111128383
assessmentNumber:
type: string
inactive:
type: boolean
AssessmentType:
allOf:
- $ref: '#/components/schemas/AssessmentToolComponent'
type: object
properties:
program:
type: string
example: '3c331adb-7392-4f2f-8c57-c7ef1408fa69'
Program:
allOf:
- $ref: '#/components/schemas/AssessmentToolComponent'
type: object
AssessmentTool:
allOf:
- $ref: '#/components/schemas/AssessmentToolComponent'
type: object
properties:
program:
type: string
example: 'ce6b29a0-d781-4ad0-961f-2486e8cca156'
overridingAssessmentTool:
type: string
description: 'When state specific assessment tools override the Universal assessment tools then this field specifies the system id of the universal assessment tool. If no universal assessment tools are overridden then this field is null'
example: 'c042adf2-69f3-47fb-8d1d-8a822a9563b9'
assessmentToolType:
type: string
enum:
- 'COMPLIANCE'
- 'INDICATOR'
example: 'COMPLIANCE'
state:
type: string
example: 'Chhattisgarh'
Checklist:
allOf:
- $ref: '#/components/schemas/AssessmentToolComponent'
type: object
properties:
areaOfConcerns:
type: array
items:
type: string
example: ['fffc1b91-df7a-403a-a64d-08b4281bc3d7', 'b8dc4122-14dd-48ec-9ec8-1345543c1455']
description: 'So far a checklist contains all the areas of concern in an assessment tool, but the system has flexibility for cases where this may not be the case. This field can be ignored.'
assessmentTool:
type: string
example: 'c042adf2-69f3-47fb-8d1d-8a822a9563b9'
AreaOfConcern:
allOf:
- $ref: '#/components/schemas/AssessmentToolReferenceComponent'
type: object
properties:
checklists:
type: array
items:
type: string
example: ['fffc1b91-df7a-403a-a64d-08b4281bc3d7', 'b8dc4122-14dd-48ec-9ec8-1345543c1455']
description: 'So far a checklist contains all the areas of concern in an assessment tool, but the system has flexibility for cases where this may not be the case. This field can be ignored.'
Standard:
allOf:
- $ref: '#/components/schemas/AssessmentToolReferenceComponent'
type: object
properties:
areaOfConcern:
type: string
description: 'System id of the area of concern to which this standard belongs to'
example: 'fffc1b91-df7a-403a-a64d-08b4281bc3d7'
MeasurableElement:
allOf:
- $ref: '#/components/schemas/AssessmentToolReferenceComponent'
type: object
properties:
standard:
type: string
description: 'System id of the standard to which this measurable element belongs to'
example: '35bb4f4e-73e3-482c-9d15-c98949382c2d'
Checkpoint:
allOf:
- $ref: '#/components/schemas/AssessmentToolComponent'
type: object
properties:
meansOfVerification:
type: string
byObservation:
type: boolean
byStaffInterview:
type: boolean
byPatientInterview:
type: boolean
byRecordReview:
type: boolean
sortOrder:
type: number
description: 'Provides the (ascending) order in which the checkpoints are arranged within a measurable element'
example: 1
measurableElement:
type: string
description: 'System id of the measurable element to which this checkpoint belongs to'
example: '81d1b92b-b0e3-46d9-bfb4-e9a0fa1ac998'
IndicatorDefinition:
allOf:
- $ref: '#/components/schemas/AssessmentToolComponent'
type: object
properties:
description:
type: string
dataType:
type: string
enum:
- Numeric
- Percentage
- Date
- Month
- Coded
codedValues:
type: string
description: when the data type is Coded
example: [ "Yes", "No", "In Progress" ]
assessmentTool:
description: 'System id of the assessment tool to which this indicator definition belongs to'
sortOrder:
type: number
description: 'Provides the (ascending) order in which the indicator definitions are arranged within a assessment tool'
example: 100
CheckpointAssessment:
type: object
description: Checkpoint is the small unit of assessment in an assessment tool. A checkpoint is scored as 0, 1 or 2. A checkpoint can also be marked as not-applicable by the assessor during the assessment and in that case the score is not provided. Checkpoints do not have a reference id like measurable element, standard or area of concern.
properties:
systemId:
type: string
example: 'd2649a85-2106-49c0-a995-266f4fb05fcc'
description: 'System id of the checkpoint'
score:
type: integer
enum:
- 0
- 1
- 2
example: 1
markedNotApplicable:
type: boolean
remarks:
type: string
example: There is a part of land under litigation.
MeasurableElementAssessment:
type: object
description: In an assessment tool, measurable element consists of checkpoints. Correspondingly, in an assessment, the measurable element consists of checkpoint scores.
properties:
systemId:
type: string
example: 'ad9f55b8-189f-4ad1-adc3-16c842be397e'
description: 'System id of measurable element'
checkpoints:
type: array
items:
$ref: '#/components/schemas/CheckpointAssessment'
numberOfCheckpoints:
type: integer
description: Total number of checkpoints scored in this measurable element, with its standard, within its area of concern, within its checklist
example: '3'
StandardAssessment:
type: object
description: In an assessment tool, standard consists of measurable elements. Correspondingly, in an assessment, their scores are grouped within a measurable element.
properties:
systemId:
type: string
example: 'c1e121a3-ca48-46eb-9963-a5f53565e3a8'
description: 'System id of the standard'
measurableElements:
type: array
items:
$ref: '#/components/schemas/MeasurableElementAssessment'
numberOfMeasurableElements:
type: integer
description: Total number of measurable elements scored in this standard within this area of concern for this checklist
example: '9'
AreaOfConcernAssessment:
type: object
description: In an assessment tool, area of concern consists of standards. Correspondingly, in an assessment, their scores are grouped within a standards.
properties:
systemId:
type: string
example: '72a7235b-a17d-42b8-a30d-9862c7424387'
description: 'System id of the area of concern'
standards:
type: array
items:
$ref: '#/components/schemas/StandardAssessment'
numberOfStandards:
type: integer
description: Total number of standards scored in this area of concern within this checklist
example: '30'
AreaOfConcernScore:
type: object
description: Scores of assessment aggregated to area of concerns and standards within them.
properties:
reference:
type: string
example: 'A'
score:
type: integer
example: 75
standardScores:
$ref: '#/components/schemas/StandardScore'
StandardScore:
type: object
description: Scores of assessment aggregated to standards.
additionalProperties:
type: integer
example:
A1: 50
A2: 54
ChecklistAssessment:
type: object
description: In an assessment tool, checklist consists of area of concerns. Correspondingly, in an assessment, their scores are grouped within an area of concerns - if the assessment tool is compliance type (the other type is indicators, but both cannot exist together, given the design of assessment tools).
properties:
systemId:
type: string
example: 'f2e98181-cc12-471e-bb5f-d4c3d8d50db5'
description: 'System id of the checklist'
areaOfConcerns:
type: array
items:
$ref: '#/components/schemas/AreaOfConcernAssessment'
score:
type: number
example: 65.5
numberOfAreaOfConcerns:
type: integer
description: Total number of area of concerns scored in this checklist
example: '8'
numberOfCheckpoints:
type: integer
description: Total number of checkpoints scored in this checklist
example: '25'
IndicatorAssessment:
type: object
description: Assessment consists of indicators, if the assessment tool is indicator type (the other type is compliance, but both cannot exist together in an assessment, given the design of assessment tools). Each indicator value in the assessment is represented by this schema.
properties:
systemId:
type: string
example: '2678730d-ed27-48d6-9bfb-ab6688a85d10'
indicatorDefinition:
type: string
example: 'ccfbbfa8-ba5b-48c2-a860-5b4fb6f86680'
description: 'System id of the indicator definition of this indicator'
value:
type: string
description: Since the indicator can have multiple data types, Gunak provides all the values as string. Based on the data type the should convert the value to appropriate data type. DataType of Month and Date are both in yyyy-MM-dd format. DataType of Percentage is a numeric value (without percentage sign).
example: 'No'
Assessment:
allOf:
- $ref: '#/components/schemas/AssessmentSummary'
type: object
properties:
checklists:
type: array
items:
$ref: '#/components/schemas/ChecklistAssessment'
areaOfConcernScores:
type: array
items:
$ref: '#/components/schemas/AreaOfConcernScore'
indicators:
type: array
items:
$ref: '#/components/schemas/IndicatorAssessment'
totalNumberOfScoredCheckpoints:
type: integer
description: Total number of checkpoints scored across checklists in this assessment
example: '100'
numberOfChecklists:
type: integer
description: Number of checklists scored in this assessment
example: '4'
AssessmentToolComponent:
description: 'This used by other schema items, not used directly'
type: object
properties:
systemId:
type: string
example: '60785eec-4b44-4336-8964-1d20a3bb8474'
name:
type: string
inactive:
type: boolean
example: false
createdDate:
type: string
format: date-time
example: '2019-03-18T10:38:03.292Z'
lastModifiedDate:
type: string
format: date-time
example: '2019-03-18T10:38:03.292Z'
AssessmentToolReferenceComponent:
description: 'This used by other schema items, not used directly'
allOf:
- $ref: '#/components/schemas/AssessmentToolComponent'
type: object
properties:
reference:
type: string