-
Notifications
You must be signed in to change notification settings - Fork 9
/
vaccine.py
1921 lines (1657 loc) · 55.1 KB
/
vaccine.py
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
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#(C) Copyright Syd Logan 2021
#(C) Copyright Thousand Smiles Foundation 2021
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#
#You may obtain a copy of the License at
#http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
'''
unit tests for vaccine application. Assumes django server is up
and running on the specified host and port
'''
import unittest
import getopt, sys
import json
from tschartslib.service.serviceapi import ServiceAPI
from tschartslib.tscharts.tscharts import Login, Logout
from tschartslib.patient.patient import CreatePatient, DeletePatient
from tschartslib.clinic.clinic import CreateClinic, DeleteClinic
class Vaccine:
def __init__(self):
self._covid19 = False
self._covid19_type = ""
self._covid19_doses = 0
self._covid19_date = None
self._covid19_booster = False
self._covid19_booster_date = None
self._dtap = False
self._dtap_date = None
self._dt = False
self._dt_date = None
self._hib = False
self._hib_date = None
self._hepa = False
self._hepa_date = None
self._hepb = False
self._hepb_date = None
self._hpv = False
self._hpv_date = None
self._iiv = False
self._iiv_date = None
self._laiv4 = False
self._laiv4_date = None
self._mmr = False
self._mmr_date = None
self._menacwy = False
self._menacwy_date = None
self._menb = False
self._menb_date = None
self._pcv13 = False
self._pcv13_date = None
self._ppsv23 = False
self._ppsv23_date = None
self._ipv = False
self._ipv_date = None
self._rv = False
self._rv_date = None
self._tap = False
self._tap_date = None
self._td = False
self._td_date = None
self._varicella = False
self._varicella_date = None
self._dtap_hepb_ipv = False
self._dtap_hepb_ipv_date = None
self._dtap_ipv_hib = False
self._dtap_ipv_hib_date = None
self._dtap_ipv = False
self._dtap_ipv_date = None
self._dtap_ipv_hib_hepb = False
self._dtap_ipv_hib_hepb_date = None
self._mmvr = False
self._mmvr_date = None
def toJSON(self):
ret = {}
ret["covid19"] = self._covid19
ret["covid19_doses"] = self._covid19_doses
ret["covid19_type"] = self._covid19_type
ret["covid19_date"] = self._covid19_date
ret["covid19_booster"] = self._covid19_booster
ret["covid19_booster_date"] = self._covid19_booster_date
ret["dtap"] = self._dtap
ret["dtap_date"] = self._dtap_date
ret["dt"] = self._dt
ret["dt_date"] = self._dt_date
ret["hib"] = self._hib
ret["hib_date"] = self._hib_date
ret["hepa"] = self._hepa
ret["hepa_date"] = self._hepa_date
ret["hepb"] = self._hepb
ret["hepb_date"] = self._hepb_date
ret["hpv"] = self._hpv
ret["hpv_date"] = self._hpv_date
ret["iiv"] = self._iiv
ret["iiv_date"] = self._iiv_date
ret["laiv4"] = self._laiv4
ret["laiv4_date"] = self._laiv4_date
ret["mmr"] = self._mmr
ret["mmr_date"] = self._mmr_date
ret["menacwy"] = self._menacwy
ret["menacwy_date"] = self._menacwy_date
ret["menb"] = self._menb
ret["menb_date"] = self._menb_date
ret["pcv13"] = self._pcv13
ret["pcv13_date"] = self._pcv13_date
ret["ppsv23"] = self._ppsv23
ret["ppsv23_date"] = self._ppsv23_date
ret["ipv"] = self._ipv
ret["ipv_date"] = self._ipv_date
ret["rv"] = self._rv
ret["rv_date"] = self._rv_date
ret["tap"] = self._tap
ret["tap_date"] = self._tap_date
ret["td"] = self._td
ret["td_date"] = self._td_date
ret["varicella"] = self._varicella
ret["varicella_date"] = self._varicella_date
ret["dtap_hepb_ipv"] = self._dtap_hepb_ipv
ret["dtap_hepb_ipv_date"] = self._dtap_hepb_ipv_date
ret["dtap_ipv_hib"] = self._dtap_ipv_hib
ret["dtap_ipv_hib_date"] = self._dtap_ipv_hib_date
ret["dtap_ipv"] = self._dtap_ipv
ret["dtap_ipv_date"] = self._dtap_ipv_date
ret["dtap_ipv_hib_hepb"] = self._dtap_ipv_hib_hepb
ret["dtap_ipv_hib_hepb_date"] = self._dtap_ipv_hib_hepb_date
ret["mmvr"] = self._mmvr
ret["mmvr_date"] = self._mmvr_date
return ret
def fromJSON(self, data, ignore=True):
ret = True
try:
self.set_covid19(data["covid19"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_covid19_type(data["covid19_type"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_covid19_doses(data["covid19_doses"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_covid19_date(data["covid19_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_covid19_booster(data["covid19_booster"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_covid19_booster_date(data["covid19_booster_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap(data["dtap"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_date(data["dtap_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dt(data["dt"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dt_date(data["dt_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hib(data["hib"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hib_date(data["hib_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hepa(data["hepa"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hepa_date(data["hepa_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hepb(data["hepb"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hepb_date(data["hepb_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hpv(data["hpv"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_hpv_date(data["hpv_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_iiv(data["iiv"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_iiv_date(data["iiv_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_laiv4(data["laiv4"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_laiv4_date(data["laiv4_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_mmr(data["mmr"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_mmr_date(data["mmr_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_menacwy(data["menacwy"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_menacwy_date(data["menacwy_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_menb(data["menb"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_menb_date(data["menb_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_pcv13(data["pcv13"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_pcv13_date(data["pcv13_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_ppsv23(data["ppsv23"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_ppsv23_date(data["ppsv23_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_ipv(data["ipv"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_ipv_date(data["ipv_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_rv(data["rv"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_rv_date(data["rv_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_tap(data["tap"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_tap_date(data["tap_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_td(data["td"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_td_date(data["td_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_varicella(data["varicella"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_varicella_date(data["varicella_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_hepb_ipv(data["dtap_hepb_ipv"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_hepb_ipv_date(data["dtap_hepb_ipv_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_ipv_hib(data["dtap_ipv_hib"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_ipv_hib_date(data["dtap_ipv_hib_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_ipv(data["dtap_ipv"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_ipv_date(data["dtap_ipv_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_ipv_hib_hepb(data["dtap_ipv_hib_hepb"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_dtap_ipv_hib_hepb_date(data["dtap_ipv_hib_hepb_date"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_mmvr(data["mmvr"])
except:
if ignore:
pass
else:
ret = False
try:
self.set_mmvr_date(data["mmvr_date"])
except:
if ignore:
pass
else:
ret = False
return ret
def set_covid19(self, val):
self._covid19 = val
def set_covid19_doses(self, val):
self._covid19_doses = val
def set_covid19_type(self, val):
self._covid19_type = val
def set_covid19_date(self, val):
self._covid19_date= val
def set_covid19_booster(self, val):
self._covid19_booster = val
def set_covid19_booster_date(self, val):
self._covid19_booster_date = val
def set_dtap(self, val):
self._dtap = val
def set_dtap_date(self, val):
self._dtap_date = val
def set_dt(self, val):
self._dt = val
def set_dt_date(self, val):
self._dt_date = val
def set_hib(self, val):
self._hib = val
def set_hib_date(self, val):
self._hib_date = val
def set_hepa(self, val):
self._hepa = val
def set_hepa_date(self, val):
self._hepa_date = val
def set_hepb(self, val):
self._hepb = val
def set_hepb_date(self, val):
self._hepb_date = val
def set_hpv(self, val):
self._hpv = val
def set_hpv_date(self, val):
self._hpv_date = val
def set_iiv(self, val):
self._iiv = val
def set_iiv_date(self, val):
self._iiv_date = val
def set_laiv4(self, val):
self._laiv4 = val
def set_laiv4_date(self, val):
self._laiv4_date = val
def set_mmr(self, val):
self._mmr = val
def set_mmr_date(self, val):
self._mmr_date = val
def set_menacwy(self, val):
self._menacwy = val
def set_menacwy_date(self, val):
self._menacwy_date = val
def set_menb(self, val):
self._menb = val
def set_menb_date(self, val):
self._menb_date = val
def set_pcv13(self, val):
self._pcv13 = val
def set_pcv13_date(self, val):
self._pcv13_date = val
def set_ppsv23(self, val):
self._ppsv23 = val
def set_ppsv23_date(self, val):
self._ppsv23_date = val
def set_ipv(self, val):
self._ipv = val
def set_ipv_date(self, val):
self._ipv_date = val
def set_rv(self, val):
self._rv = val
def set_rv_date(self, val):
self._rv_date = val
def set_tap(self, val):
self._tap = val
def set_tap_date(self, val):
self._tap_date = val
def set_td(self, val):
self._td = val
def set_td_date(self, val):
self._td_date = val
def set_varicella(self, val):
self._varicella = val
def set_varicella_date(self, val):
self._varicella_date = val
def set_dtap_hepb_ipv(self, val):
self._dtap_hepb_ipv = val
def set_dtap_hepb_ipv_date(self, val):
self._dtap_hepb_ipv_date = val
def set_dtap_ipv_hib(self, val):
self._dtap_ipv_hib = val
def set_dtap_ipv_hib_date(self, val):
self._dtap_ipv_hib_date = val
def set_dtap_ipv(self, val):
self._dtap_ipv = val
def set_dtap_ipv_date(self, val):
self._dtap_ipv_date= val
def set_dtap_ipv_hib_hepb(self, val):
self._dtap_ipv_hib_hepb = val
def set_dtap_ipv_hib_hepb_date(self, val):
self._dtap_ipv_hib_hepb_date = val
def set_mmvr(self, val):
self._mmvr = val
def set_mmvr_date(self, val):
self._mmvr_date = val
def get_covid19(self):
return self._covid19
def get_covid19_type(self):
return self._covid19_type
def get_covid19_doses(self):
return self._covid19_doses
def get_covid19_date(self):
return self._covid19_date
def get_covid19_booster(self):
return self._covid19_booster
def get_covid19_booster_date(self):
return self._covid19_booster_date
def get_dtap(self):
return self._dtap
def get_dtap_date(self):
return self._dtap_date
def get_dt(self):
return self._dt
def get_dt_date(self):
return self._dt_date
def get_hib(self):
return self._hib
def get_hib_date(self):
return self._hib_date
def get_hepa(self):
return self._hepa
def get_hepa_date(self):
return self._hepa_date
def get_hepb(self):
return self._hepb
def get_hepb_date(self):
return self._hepb_date
def get_hpv(self):
return self._hpv
def get_hpv_date(self):
return self._hpv_date
def get_iiv(self):
return self._iiv
def get_iiv_date(self):
return self._iiv_date
def get_laiv4(self):
return self._laiv4
def get_laiv4_date(self):
return self._laiv4_date
def get_mmr(self):
return self._mmr
def get_mmr_date(self):
return self._mmr_date
def get_menacwy(self):
return self._menacwy
def get_menacwy_date(self):
return self._menacwy_date
def get_menb(self):
return self._menb
def get_menb_date(self):
return self._menb_date
def get_pcv13(self):
return self._pcv13
def get_pcv13_date(self):
return self._pcv13_date
def get_ppsv23(self):
return self._ppsv23
def get_ppsv23_date(self):
return self._ppsv23_date
def get_ipv(self):
return self._ipv
def get_ipv_date(self):
return self._ipv_date
def get_rv(self):
return self._rv
def get_rv_date(self):
return self._rv_date
def get_tap(self):
return self._tap
def get_tap_date(self):
return self._tap_date
def get_td(self):
return self._td
def get_td_date(self):
return self._td_date
def get_varicella(self):
return self._varicella
def get_varicella_date(self):
return self._varicella_date
def get_dtap_hepb_ipv(self):
return self._dtap_hepb_ipv
def get_dtap_hepb_ipv_date(self):
return self._dtap_hepb_ipv_date
def get_dtap_ipv_hib(self):
return self._dtap_ipv_hib
def get_dtap_ipv_hib_date(self):
return self._dtap_ipv_hib_date
def get_dtap_ipv(self):
return self._dtap_ipv
def get_dtap_ipv_date(self):
return self._dtap_ipv_date
def get_dtap_ipv_hib_hepb(self):
return self._dtap_ipv_hib_hepb
def get_dtap_ipv_hib_hepb_date(self):
return self._dtap_ipv_hib_hepb_date
def get_mmvr(self):
return self._mmvr
def get_mmvr_date(self):
return self._mmvr_date
class CreateVaccine(ServiceAPI):
def __init__(self, host, port, token, clinic, patient):
super(CreateVaccine, self).__init__()
self.setHttpMethod("POST")
self.setHost(host)
self.setPort(port)
self.setToken(token)
self._payload = {"patient": patient, "clinic": clinic}
self.setPayload(self._payload)
self.setURL("tscharts/v1/vaccine/")
self._v = Vaccine()
def setVaccine(self, vaccine):
for k, v in vaccine.iteritems():
self._payload[k] = v
self.setPayload(self._payload)
class GetVaccine(ServiceAPI):
def makeURL(self):
hasQArgs = False
if not self._id == None:
base = "tscharts/v1/vaccine/{}/".format(self._id)
else:
base = "tscharts/v1/vaccine/"
if not self._clinic == None:
if not hasQArgs:
base += "?"
else:
base += "&"
base += "clinic={}".format(self._clinic)
hasQArgs = True
if not self._patient == None:
if not hasQArgs:
base += "?"
else:
base += "&"
base += "patient={}".format(self._patient)
hasQArgs = True
self.setURL(base)
def __init__(self, host, port, token):
super(GetVaccine, self).__init__()
self.setHttpMethod("GET")
self.setHost(host)
self.setPort(port)
self.setToken(token)
self._clinic = None
self._patient = None
self._id = None
self.makeURL()
self._v = Vaccine()
def setId(self, id):
self._id = id;
self.makeURL()
def setClinic(self, clinic):
self._clinic = clinic
self.makeURL()
def setPatient(self, patient):
self._patient = patient
self.makeURL()
class UpdateVaccine(ServiceAPI):
def __init__(self, host, port, token, id):
super(UpdateVaccine, self).__init__()
self.setHttpMethod("PUT")
self.setHost(host)
self.setPort(port)
self.setToken(token)
self._payload = self.getPayload()
self.setPayload(self._payload)
self.setURL("tscharts/v1/vaccine/{}/".format(id))
self._v = Vaccine()
def setVaccine(self, vaccine):
for k, v in vaccine.iteritems():
self._payload[k] = v
self.setPayload(self._payload)
class DeleteVaccine(ServiceAPI):
def __init__(self, host, port, token, id):
super(DeleteVaccine, self).__init__()
self.setHttpMethod("DELETE")
self.setHost(host)
self.setPort(port)
self.setToken(token)
self.setURL("tscharts/v1/vaccine/{}/".format(id))
class TestTSVaccine(unittest.TestCase):
def setUp(self):
login = Login(host, port, username, password)
ret = login.send(timeout=30)
self.assertEqual(ret[0], 200)
self.assertTrue("token" in ret[1])
global token
token = ret[1]["token"]
def testCreateVaccineNoneDate(self):
x = CreateClinic(host, port, token, "Ensenada", "02/05/2016", "02/06/2016")
ret = x.send(timeout=30)
self.assertEqual(ret[0], 200)
self.assertTrue("id" in ret[1])
clinicid = int(ret[1]["id"])
data = {}
data["paternal_last"] = "abcd1234"
data["maternal_last"] = "yyyyyy"
data["first"] = "zzzzzzz"
data["middle"] = ""
data["suffix"] = "Jr."
data["prefix"] = ""
data["dob"] = "04/01/1962"
data["gender"] = "Female"
data["street1"] = "1234 First Ave"
data["street2"] = ""
data["city"] = "Ensenada"
data["colonia"] = ""
data["state"] = u"Baja California"
data["phone1"] = "1-111-111-1111"
data["phone2"] = ""
data["email"] = "[email protected]"
data["emergencyfullname"] = "Maria Sanchez"
data["emergencyphone"] = "1-222-222-2222"
data["emergencyemail"] = "[email protected]"
x = CreatePatient(host, port, token, data)
ret = x.send(timeout=30)
self.assertEqual(ret[0], 200)
patientid = int(ret[1]["id"])
x = CreateVaccine(host, port, token, patient=patientid, clinic=clinicid)
x._v.set_covid19(True)
x._v.set_covid19_doses(1)
x._v.set_covid19_type("Moderna")
x._v.set_covid19_date("01/01/1901")
x._v.set_covid19_booster(False)
x._v.set_covid19_booster_date(None)
x._v.set_dtap(True)
x._v.set_dtap_date("01/01/1903")
x._v.set_dt(False)
x._v.set_dt_date(None)
x._v.set_hib(True)
x._v.set_hib_date("01/01/1905")
x._v.set_hepa(False)
x._v.set_hepa_date(None)
x._v.set_hepb(True)
x._v.set_hepb_date("01/01/1907")
x._v.set_hpv(False)
x._v.set_hpv_date(None)
x._v.set_iiv(True)
x._v.set_iiv_date("01/01/1909")
x._v.set_laiv4(False)
x._v.set_laiv4_date(None)
x._v.set_mmr(True)
x._v.set_mmr_date("01/01/1911")
x._v.set_menacwy(False)
x._v.set_menacwy_date(None)
x._v.set_menb(True)
x._v.set_menb_date("01/01/1913")
x._v.set_pcv13(False)
x._v.set_pcv13_date(None)
x._v.set_ppsv23(True)
x._v.set_ppsv23_date("01/01/1915")
x._v.set_ipv(False)
x._v.set_ipv_date(None)