@@ -52,6 +52,7 @@ export const properties = {
52
52
*
53
53
* @property {object } type - schema(data) type
54
54
* @property {boolean } trim - force trimming
55
+ * @property {boolean } startcase - ensure start case(or title case)
55
56
* @property {boolean } index - ensure database index
56
57
* @property {boolean } searchable - allow for searching
57
58
* @property {boolean } taggable - allow field use for tagging
@@ -68,6 +69,7 @@ export const properties = {
68
69
export const name = {
69
70
type : String ,
70
71
trim : true ,
72
+ startcase : true ,
71
73
index : true ,
72
74
searchable : true ,
73
75
taggable : true ,
@@ -152,7 +154,7 @@ export const score = {
152
154
} ;
153
155
154
156
/**
155
- * @name phone
157
+ * @name mobile
156
158
* @description A mobile phone number of the party(i.e individual).
157
159
*
158
160
* @property {object } type - schema(data) type
@@ -177,7 +179,39 @@ export const mobile = {
177
179
searchable : true ,
178
180
taggable : true ,
179
181
exportable : true ,
180
- fake : ( faker ) => faker . helpers . replaceSymbolWithNumber ( '255714######' ) ,
182
+ fake : ( f ) => f . helpers . replaceSymbolWithNumber ( '255714######' ) ,
183
+ } ;
184
+
185
+ /**
186
+ * @name email
187
+ * @description Email address of the party(i.e individual).
188
+ *
189
+ * @type {object }
190
+ * @property {object } type - schema(data) type
191
+ * @property {boolean } trim - force trimming
192
+ * @property {boolean } lowercase - force lower-casing
193
+ * @property {boolean } email - force to be a valid email address
194
+ * @property {boolean } index - ensure database index
195
+ * @property {boolean } searchable - allow for searching
196
+ * @property {boolean } taggable - allow field use for tagging
197
+ * @property {object } fake - fake data generator options
198
+ *
199
+ * @since 0.1.0
200
+ * @version 0.1.0
201
+ * @instance
202
+ * @example
203
+ * jane.doe@example.com
204
+ */
205
+ export const email = {
206
+ type : String ,
207
+ trim : true ,
208
+ lowercase : true ,
209
+ email : true ,
210
+ index : true ,
211
+ searchable : true ,
212
+ taggable : true ,
213
+ exportable : true ,
214
+ fake : ( f ) => f . internet . email ( ) ,
181
215
} ;
182
216
183
217
/**
@@ -503,12 +537,9 @@ export const nationality = {
503
537
* @description A party who closest to a victim.
504
538
*
505
539
* @type {object }
506
- * @property {string } name - Full name of the nextOfKin
507
- * @property {string } mobile - Mobile phone number of the nextOfKin
508
- * @property {object } facility - Facility of the nextOfKin
509
- * @property {object } area - Administrative area of the nextOfKin
510
- * @property {object } location - Geo-point of the nextOfKin
511
- * @property {string } address - Address of the nextOfKin
540
+ * @property {string } name - Full name of the next of kin
541
+ * @property {string } mobile - Mobile phone number of the next of kin
542
+ * @property {string } email - Email address of the victim
512
543
*
513
544
* @author lally elias <lallyelias87@gmail.com>
514
545
* @since 0.1.0
@@ -518,11 +549,13 @@ export const nationality = {
518
549
* {
519
550
* name: "Jane Doe",
520
551
* mobile: "+255715463739"
552
+ * email: "jane.doe@example .com"
521
553
* }
522
554
*/
523
555
export const nextOfKin = createSubSchema ( {
524
556
name,
525
557
mobile,
558
+ email,
526
559
} ) ;
527
560
528
561
/**
@@ -534,6 +567,7 @@ export const nextOfKin = createSubSchema({
534
567
* @property {string } pcr - Valid patient care number
535
568
* @property {string } name - Full name of the victim
536
569
* @property {string } mobile - Mobile phone number of the victim
570
+ * @property {string } email - Email address of the victim
537
571
* @property {object } gender - Gender of the victim
538
572
* @property {number } age - Age of the victim
539
573
* @property {number } weight - Weight of the victim
@@ -551,6 +585,7 @@ export const nextOfKin = createSubSchema({
551
585
* pcr: "PTN-8687",
552
586
* name: "Jane Doe",
553
587
* mobile: "+255715463739",
588
+ * email: "jane.doe@example .com",
554
589
* gender: { name: { en: "Female"} },
555
590
* age: 23,
556
591
* weight: 53,
@@ -566,6 +601,7 @@ export const victim = createSubSchema({
566
601
pcr,
567
602
name,
568
603
mobile,
604
+ email,
569
605
gender,
570
606
age,
571
607
// dob
@@ -578,20 +614,12 @@ export const victim = createSubSchema({
578
614
} ) ;
579
615
580
616
/**
581
- * @name victim
582
- * @description A party(i.e patient or victim) whom a case is for .
617
+ * @name followup
618
+ * @description A party(i.e doctor or nurse) who followed case victim .
583
619
*
584
620
* @type {object }
585
- * @property {string } referral - Valid referral number
586
- * @property {string } pcr - Valid patient care number
587
- * @property {string } name - Full name of the victim
588
- * @property {string } mobile - Mobile phone number of the victim
589
- * @property {object } gender - Gender of the victim
590
- * @property {number } age - Age of the victim
591
- * @property {number } weight - Weight of the victim
592
- * @property {object } occupation - Occupation of the victim
593
- * @property {object } nationality - Nationality of the victim
594
- * @property {string } address - Address of the victim
621
+ * @property {object } follower - Following party
622
+ * @property {Date } followedAt - Latest date followed
595
623
*
596
624
* @author lally elias <lallyelias87@gmail.com>
597
625
* @since 0.1.0
@@ -610,7 +638,7 @@ export const followup = createSubSchema({
610
638
follower,
611
639
followedAt,
612
640
symptoms : properties ,
613
- score,
641
+ score, // TODO: systemScore vs followerScore
614
642
outcome,
615
643
remarks,
616
644
} ) ;
0 commit comments