source: main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py @ 12801

Last change on this file since 12801 was 12801, checked in by Henrik Bettermann, 10 years ago

Add referees List field (for demonstration purposes only).

  • Property svn:keywords set to Id
File size: 32.1 KB
Line 
1## $Id: interfaces.py 12801 2015-03-20 13:32:14Z henrik $
2##
3## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18
19from zope import schema
20from datetime import datetime
21from zc.sourcefactory.basic import BasicSourceFactory
22from waeup.ikoba.interfaces import IIkobaObject
23from waeup.ikoba.customers.interfaces import (
24    ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract,
25    validate_email)
26from waeup.ikoba.customers.vocabularies import (
27    ConCatProductSource,
28    CustomerDocumentSource,
29    RefereeSourceFactory,
30    nats_vocab,
31    )
32from waeup.ikoba.schema import TextLineChoice, FormattedDate, PhoneNumber
33from waeup.ikoba.products.productoptions import ProductOptionField
34from ikobacustom.pcn.interfaces import MessageFactory as _
35from ikobacustom.pcn.interfaces import LGASource
36from ikobacustom.pcn.customers.schoolgrades import ResultEntryField
37
38def year_range():
39    curr_year = datetime.now().year
40    return range(curr_year - 2, curr_year + 5)
41
42class PracticeSource(BasicSourceFactory):
43    """A source for categories of practice.
44    """
45    def getValues(self):
46        return [
47            'academic',
48            'administrative',
49            'distribution',
50            'importation',
51            'manufacturing',
52            'retail and dispensing',
53            'research and training',
54            'hospital practice',
55            'wholesale',
56            ]
57
58
59class IPCNCustomer(ICustomer):
60    """Representation of a customer.
61
62    """
63
64    date_of_birth = FormattedDate(
65        title = _(u'Date of Birth'),
66        required = True,
67        show_year = True,
68        )
69
70    res_address = schema.Text(
71        title = _(u'Residential Address'),
72        required = True,
73        )
74
75# Customer document interfaces
76
77
78class IPCNCustomerJPGDocument(ICustomerDocument):
79    """A customer jpg document.
80
81    """
82
83class IPCNCustomerPDFDocument(ICustomerPDFDocument):
84    """A customer pdf document.
85
86    """
87
88# Customer contract interfaces
89
90class IRONContract(IContract):
91    """A Retention of Name contract.
92
93    """
94
95    nationality = schema.Choice(
96        vocabulary = nats_vocab,
97        title = _(u'Nationality'),
98        required = False,
99        )
100
101    lga = schema.Choice(
102        source = LGASource(),
103        title = _(u'State / LGA'),
104        required = False,
105        )
106
107    year_qualification = schema.Choice(
108        title = _(u'Year of Qualification'),
109        required = True,
110        values = year_range(),
111        )
112
113    work_address = schema.Text(
114        title = _(u'Work Address'),
115        required = False,
116        )
117
118    work_email = schema.TextLine(
119        title = _(u'Work Email Address'),
120        required = False,
121        constraint=validate_email,
122        )
123
124    work_phone = PhoneNumber(
125        title = _(u'Work Phone'),
126        description = u'',
127        required = False,
128        )
129
130    categories_practice = schema.List(
131        title = _(u'Categories of Practice'),
132        value_type = schema.Choice(source=PracticeSource()),
133        required = False,
134        default = [],
135        )
136
137    superintendent = schema.Bool(
138        title= _('Superintendent'),
139        description= _('Tick box if you are a superintendent pharamcist.'),
140        required = False,
141        )
142
143    #document_object = schema.Choice(
144    #    title = _(u'Document'),
145    #    source = CustomerDocumentSource(),
146    #    required = False,
147    #    )
148
149class IRONContractOfficialUse(IIkobaObject):
150    """Interface for editing RON official use data.
151
152    """
153
154    comment = schema.Text(
155        title= _('Reason for rejection'),
156        required = False,
157        )
158
159
160class IRONContractProcess(IRONContract, IRONContractOfficialUse):
161    """Interface for processing RON data.
162    """
163
164    product_options = schema.List(
165        title = _(u'Options/Fees'),
166        value_type = ProductOptionField(),
167        required = False,
168        readonly = False,
169        default = [],
170        )
171
172class IRONContractEdit(IRONContract):
173    """Interface for editing RON data by customers.
174
175    """
176
177    #document_object = schema.Choice(
178    #    title = _(u'Document'),
179    #    source = CustomerDocumentSource(),
180    #    required = True,
181    #    )
182
183
184class IROPContract(IContract):
185    """A Registration of Premises contract.
186
187    """
188
189    premises_address = schema.Text(
190        title = _(u'Name and  Address of Pharmaceutical Premises'),
191        required = True,
192        )
193
194    categories_practice = schema.List(
195        title = _(u'Categories of Practice'),
196        value_type = schema.Choice(source=PracticeSource()),
197        required = False,
198        default = [],
199        )
200
201    premises_certificate = schema.TextLine(
202        title = _(u'Last Premises Certificate'),
203        description= _('If an old premises, state the last premises certificate number issued with date.'),
204        required = False,
205        )
206
207    date_of_qualification = FormattedDate(
208        title = _(u'Date of Qualification'),
209        required = False,
210        show_year = True,
211        )
212
213    last_license_number = schema.TextLine(
214        title = _(u'Last Annual License Number'),
215        required = False,
216        )
217
218    superintendent = schema.Bool(
219        title= _('Superintendent'),
220        description= _('Tick box if you were a superintendent pharamcist last year.'),
221        required = False,
222        )
223
224    work_address = schema.Text(
225        title = _(u'Full Time Employment Address'),
226        description= _('Enter work address if you were not a superintendent pharamcist last year.'),
227        required = False,
228        )
229
230    pharmacists_directors= schema.TextLine(
231        title = _(u'Pharmacist Directors'),
232        description = _(u'Full name of directors and their profession as in Form C.O.7'),
233        required = False,
234        )
235
236    other_directors= schema.TextLine(
237        title = _(u'Other Directors'),
238        description = _(u'Full name of directors and their profession as in Form C.O.7'),
239        required = False,
240        )
241
242    #document_object = schema.Choice(
243    #    title = _(u'Document'),
244    #    source = CustomerDocumentSource(),
245    #    required = False,
246    #    )
247
248class IROPContractOfficialUse(IIkobaObject):
249    """Interface for editing ROP official use data.
250
251    """
252
253    inspected = schema.Bool(
254        title = _('Inspected'),
255        description = _('Has the premises been duly inspected?'),
256        required = False,
257        )
258
259    recommended = schema.Bool(
260        title = _('Recommended'),
261        description= _('Is the premises recommended?'),
262        required = False,
263        )
264
265    official_in_state = schema.TextLine(
266        title = _(u'Name of Official in the State'),
267        required = False,
268        )
269
270class IROPContractProcess(IROPContract, IROPContractOfficialUse):
271    """Interface for processing RON data.
272    """
273
274    product_options = schema.List(
275        title = _(u'Options/Fees'),
276        value_type = ProductOptionField(),
277        required = False,
278        readonly = False,
279        default = [],
280        )
281
282class IROPContractEdit(IROPContract):
283    """Interface for editing RON data by customers.
284
285    """
286
287    #document_object = schema.Choice(
288    #    title = _(u'Document'),
289    #    source = CustomerDocumentSource(),
290    #    required = True,
291    #    )
292
293class IRPRContract(IContract):
294    """A Registration in the Provisional Register contract.
295
296    """
297
298    nationality = schema.Choice(
299        vocabulary = nats_vocab,
300        title = _(u'Nationality'),
301        required = False,
302        )
303
304    pharmacies_addresses = schema.Text(
305        title = _(u'Pharmacies Attended'),
306        description = u'Enter the addresses of pharmacies and periods of attendance.',
307        required = False,
308        readonly = False,
309        )
310
311    qualifications = schema.Text(
312        title = _(u'Qualifications'),
313        description = u'Enter a list of certificates obtained.',
314        required = False,
315        readonly = False,
316        )
317
318    certificates_object = schema.Choice(
319        title = _(u'Certificates'),
320        description = u'Select the document which contains scanned copies '
321                      u'of your certificates. You must create such a '
322                      u'document first.',
323        source = CustomerDocumentSource(),
324        required = False,
325        )
326
327    referees = schema.List(
328        title = _(u'Referees'),
329        value_type = schema.Choice(
330            source=RefereeSourceFactory(),
331            required = True,
332            ),
333        description = u'Add at least two referees from the PCN database.',
334        required = False,
335        readonly = False,
336        default = [],
337        )
338
339    referee1_name = schema.TextLine(
340        title = _(u'First Referee Name'),
341        description= _('This referee must be a pharmacist.'),
342        required = False,
343        readonly = False,
344        )
345
346    referee1_address = schema.Text(
347        title = _(u'First Referee Address'),
348        required = False,
349        readonly = False,
350        )
351
352    referee1_license = schema.TextLine(
353        title = _(u'First Referee License Number'),
354        required = False,
355        readonly = False,
356        )
357
358    referee2_name = schema.TextLine(
359        title = _(u'Second Referee Name'),
360        required = False,
361        readonly = False,
362        )
363
364    referee2_address = schema.Text(
365        title = _(u'Second Referee Address'),
366        required = False,
367        readonly = False,
368        )
369
370    referee2_license = schema.TextLine(
371        title = _(u'Second Referee License Number'),
372        required = False,
373        readonly = False,
374        )
375
376    internship_address = schema.Text(
377        title = _(u'Internship'),
378        description = _('Enter name and address of company where you want to '
379                        'serve your internship.'),
380        required = False,
381        readonly = False,
382        )
383
384
385
386class IRPRContractOfficialUse(IIkobaObject):
387    """Interface for editing RPR official use data.
388
389    """
390
391    comment = schema.Text(
392        title= _('Reason for rejection'),
393        required = False,
394        )
395
396
397class IRPRContractProcess(IRPRContract, IRPRContractOfficialUse):
398    """Interface for processing RPR data.
399    """
400
401    product_options = schema.List(
402        title = _(u'Options/Fees'),
403        value_type = ProductOptionField(),
404        required = False,
405        readonly = False,
406        default = [],
407        )
408
409class IRPRContractEdit(IRPRContract):
410    """Interface for editing RPR data by customers.
411
412    """
413
414    certificates_object = schema.Choice(
415        title = _(u'Certificates'),
416        description = u'Select the document which contains scanned copies '
417                      u'of your certificates. You must create such a '
418                      u'document first.',
419        source = CustomerDocumentSource(),
420        required = True,
421        )
422
423IRPRContractEdit['certificates_object'].order = IRPRContract[
424    'certificates_object'].order
425
426
427class IRPCContract(IContract):
428    """A Registration as Pharmaceutical Chemist contract.
429
430    """
431
432    nationality = schema.Choice(
433        vocabulary = nats_vocab,
434        title = _(u'Nationality'),
435        required = False,
436        )
437
438    nationality_aquired = schema.Choice(
439        values=[_(u'birth'), _(u'naturalization'), _(u'marriage')],
440        title = _(u'Nationality acquired by'),
441        required = False,
442        )
443
444    qualifications = schema.Text(
445        title = _(u'Qualifications'),
446        description = u'Enter a list of certificates obtained.',
447        required = False,
448        readonly = False,
449        )
450
451    certificates_object = schema.Choice(
452        title = _(u'Certificates'),
453        description = u'Select the document which contains scanned copies '
454                      u'of your certificates. You must create such a '
455                      u'document first.',
456        source = CustomerDocumentSource(),
457        required = False,
458        )
459
460    referees = schema.List(
461        title = _(u'Referees'),
462        value_type = schema.Choice(
463            source=RefereeSourceFactory(),
464            required = True,
465            ),
466        description = u'Add at least two referees from the PCN database.',
467        required = False,
468        readonly = False,
469        default = [],
470        )
471
472    referee1_name = schema.TextLine(
473        title = _(u'First Referee Name'),
474        required = False,
475        readonly = False,
476        )
477
478    referee1_address = schema.Text(
479        title = _(u'First Referee Address'),
480        required = False,
481        readonly = False,
482        )
483
484    referee1_license = schema.TextLine(
485        title = _(u'First Referee License Number'),
486        required = False,
487        readonly = False,
488        )
489
490    referee2_name = schema.TextLine(
491        title = _(u'Second Referee Name'),
492        required = False,
493        readonly = False,
494        )
495
496    referee2_address = schema.Text(
497        title = _(u'Second Referee Address'),
498        required = False,
499        readonly = False,
500        )
501
502    referee2_license = schema.TextLine(
503        title = _(u'Second Referee License Number'),
504        required = False,
505        readonly = False,
506        )
507
508    internship = schema.Text(
509        title = _(u'Internship'),
510        description = u'Enter name and address of the company where you '
511                      u'served your internship, the name of the approved '
512                      u'registered pharmacist and the period of your service.',
513        required = False,
514        readonly = False,
515        )
516
517    nigerian_residence = FormattedDate(
518        title = _(u'Residence in Nigeria'),
519        description = u'Enter the date since when you have continously '
520                      u'resided in Nigeria.',
521        required = False,
522        show_year = True,
523        )
524
525    witness = schema.Text(
526        title = _(u'Witness'),
527        description = u'Enter name and adress of witness.',
528        required = False,
529        )
530
531
532class IRPCContractOfficialUse(IIkobaObject):
533    """Interface for editing RPC official use data.
534
535    """
536
537    comment = schema.Text(
538        title= _('Reason for rejection'),
539        required = False,
540        )
541
542
543class IRPCContractProcess(IRPCContract, IRPCContractOfficialUse):
544    """Interface for processing RPC data.
545    """
546
547    product_options = schema.List(
548        title = _(u'Options/Fees'),
549        value_type = ProductOptionField(),
550        required = False,
551        readonly = False,
552        default = [],
553        )
554
555class IRPCContractEdit(IRPCContract):
556    """Interface for editing RPC data by customers.
557
558    """
559
560    certificates_object = schema.Choice(
561        title = _(u'Certificates'),
562        description = u'Select the document which contains scanned copies '
563                      u'of your certificates. You must create such a '
564                      u'document first.',
565        source = CustomerDocumentSource(),
566        required = True,
567        )
568
569IRPCContractEdit['certificates_object'].order = IRPCContract[
570    'certificates_object'].order
571
572class IIPPMVLContract(IContract):
573    """A Issuance of Patent and Proprietary Medicines Vendors License.
574
575    """
576
577    occupation = schema.TextLine(
578        title = _(u'Occupation'),
579        required = False,
580        readonly = False,
581        )
582
583    qualifications = schema.Text(
584        title = _(u'Educational Qualifications'),
585        description = u'Enter a list of certificates obtained.',
586        required = False,
587        readonly = False,
588        )
589
590    certificates_object = schema.Choice(
591        title = _(u'Certificates/Credentials'),
592        description = u'Select the pdf document which contains scanned copies '
593                      u'of your certificates. You must create such a '
594                      u'document first.',
595        source = CustomerDocumentSource(),
596        required = False,
597        )
598
599    incometax_object = schema.Choice(
600        title = _(u'Income Tax Clearance'),
601        description = u'Select the pdf document which contains scanned copies '
602                      u'of your income tax clearance for the past three years. '
603                      u'You must create such a document first.',
604        source = CustomerDocumentSource(),
605        required = False,
606        )
607
608    shop_address = schema.Text(
609        title = _(u'Patent Vendor\'s Shop'),
610        description = u'Enter name and address of patent vendor\'s shop.',
611        required = False,
612        )
613
614    shop_lga = schema.Choice(
615        source = LGASource(),
616        title = _(u'State / LGA'),
617        required = False,
618        )
619
620    shop_email = schema.TextLine(
621        title = _(u'Shop Email Address'),
622        required = False,
623        constraint=validate_email,
624        )
625
626    shop_phone = PhoneNumber(
627        title = _(u'Shop Phone'),
628        description = u'',
629        required = False,
630        )
631
632    old_or_new = schema.Choice(
633        values=[_(u'old'), _(u'new')],
634        title = _(u'Old or New Shop'),
635        required = False,
636        )
637
638    PPMVL_number = schema.TextLine(
639        title = _(u'PPMVL Data'),
640        description = u'If an old store, state PPMVL number and date of issue.',
641        required = False,
642        readonly = False,
643        )
644
645    referee1_name = schema.TextLine(
646        title = _(u'First Referee Name'),
647        required = False,
648        readonly = False,
649        )
650
651    referee1_address = schema.Text(
652        title = _(u'First Referee Address'),
653        required = False,
654        readonly = False,
655        )
656
657    referee1_license = schema.TextLine(
658        title = _(u'First Referee License Number'),
659        required = False,
660        readonly = False,
661        )
662
663    referee1_occupation = schema.TextLine(
664        title = _(u'First Referee Occupation'),
665        required = False,
666        readonly = False,
667        )
668
669    referee2_name = schema.TextLine(
670        title = _(u'Second Referee Name'),
671        required = False,
672        readonly = False,
673        )
674
675    referee2_address = schema.Text(
676        title = _(u'Second Referee Address'),
677        required = False,
678        readonly = False,
679        )
680
681    referee2_license = schema.TextLine(
682        title = _(u'Second Referee License Number'),
683        required = False,
684        readonly = False,
685        )
686
687    referee2_occupation = schema.TextLine(
688        title = _(u'Second Referee Occupation'),
689        required = False,
690        readonly = False,
691        )
692
693
694class IIPPMVLContractOfficialUse(IIkobaObject):
695    """Interface for editing IPPMVL official use data.
696
697    """
698
699    comment = schema.Text(
700        title= _('Reason for rejection'),
701        required = False,
702        )
703
704
705class IIPPMVLContractProcess(IIPPMVLContract, IIPPMVLContractOfficialUse):
706    """Interface for processing IPPMVL data.
707    """
708
709    product_options = schema.List(
710        title = _(u'Options/Fees'),
711        value_type = ProductOptionField(),
712        required = False,
713        readonly = False,
714        default = [],
715        )
716
717class IIPPMVLContractEdit(IIPPMVLContract):
718    """Interface for editing IPPMVL data by customers.
719
720    """
721
722    certificates_object = schema.Choice(
723        title = _(u'Certificates'),
724        description = u'Select the document which contains scanned copies '
725                      u'of your certificates. You must create such a '
726                      u'document first.',
727        source = CustomerDocumentSource(),
728        required = True,
729        )
730
731    incometax_object = schema.Choice(
732        title = _(u'Income Tax Clearance'),
733        description = u'Select the pdf document which contains scanned copies '
734                      u'of your income tax clearance for the past three years. '
735                      u'You must create such a document first.',
736        source = CustomerDocumentSource(),
737        required = True,
738        )
739
740IIPPMVLContractEdit['certificates_object'].order = IIPPMVLContract[
741    'certificates_object'].order
742
743IIPPMVLContractEdit['incometax_object'].order = IIPPMVLContract[
744    'incometax_object'].order
745
746class IRPPMVLContract(IContract):
747    """A Renewal of Patent and Proprietary Medicines Vendors License.
748
749    """
750
751    occupation = schema.TextLine(
752        title = _(u'Occupation'),
753        required = False,
754        readonly = False,
755        )
756
757    qualifications = schema.Text(
758        title = _(u'Educational Qualifications'),
759        description = u'Enter a list of certificates obtained.',
760        required = False,
761        readonly = False,
762        )
763
764    shop_address = schema.Text(
765        title = _(u'Patent Vendor\'s Shop'),
766        description = u'Enter name and address of patent vendor\'s shop.',
767        required = False,
768        )
769
770    ppmv_signpost = schema.TextLine(
771        title = _(u'PPMV Sign-post Number'),
772        required = False,
773        readonly = False,
774        )
775
776    shop_lga = schema.Choice(
777        source = LGASource(),
778        title = _(u'State / LGA'),
779        required = False,
780        )
781
782    shop_email = schema.TextLine(
783        title = _(u'Shop Email Address'),
784        required = False,
785        constraint=validate_email,
786        )
787
788    shop_phone = PhoneNumber(
789        title = _(u'Shop Phone'),
790        description = u'',
791        required = False,
792        )
793
794    PPMVL_number = schema.TextLine(
795        title = _(u'PPMVL Data'),
796        description = u'State PPMVL number and date of issue of last license.',
797        required = False,
798        readonly = False,
799        )
800
801    referee1_name = schema.TextLine(
802        title = _(u'First Referee Name'),
803        required = False,
804        readonly = False,
805        )
806
807    referee1_address = schema.Text(
808        title = _(u'First Referee Address'),
809        required = False,
810        readonly = False,
811        )
812
813    referee1_license = schema.TextLine(
814        title = _(u'First Referee License Number'),
815        required = False,
816        readonly = False,
817        )
818
819    referee1_occupation = schema.TextLine(
820        title = _(u'First Referee Occupation'),
821        required = False,
822        readonly = False,
823        )
824
825    referee2_name = schema.TextLine(
826        title = _(u'Second Referee Name'),
827        required = False,
828        readonly = False,
829        )
830
831    referee2_address = schema.Text(
832        title = _(u'Second Referee Address'),
833        required = False,
834        readonly = False,
835        )
836
837    referee2_license = schema.TextLine(
838        title = _(u'Second Referee License Number'),
839        required = False,
840        readonly = False,
841        )
842
843    referee2_occupation = schema.TextLine(
844        title = _(u'Second Referee Occupation'),
845        required = False,
846        readonly = False,
847        )
848
849
850class IRPPMVLContractOfficialUse(IIkobaObject):
851    """Interface for editing RPPMVL official use data.
852
853    """
854
855    comment = schema.Text(
856        title= _('Reason for rejection'),
857        required = False,
858        )
859
860
861class IRPPMVLContractProcess(IRPPMVLContract, IRPPMVLContractOfficialUse):
862    """Interface for processing RPPMVL data.
863    """
864
865    product_options = schema.List(
866        title = _(u'Options/Fees'),
867        value_type = ProductOptionField(),
868        required = False,
869        readonly = False,
870        default = [],
871        )
872
873class IRPPMVLContractEdit(IRPPMVLContract):
874    """Interface for editing RPPMVL data by customers.
875
876    """
877
878class IAPPITContract(IContract):
879    """A Accepting Pupil Pharmacist for Internship Training contract.
880
881    """
882
883    institution_address = schema.Text(
884        title = _(u'Institution'),
885        description= _('Enter name and address of institution '
886                       'where internee will serve.'),
887        required = False,
888        )
889
890    approved = schema.Bool(
891        title= _('Institution Approved'),
892        description= _('Tick box if the institution is approved for internship.'),
893        required = False,
894        )
895
896    inst_certificate = schema.TextLine(
897        title = _(u'Institution Certificate'),
898        description= _('Enter the institutions certificate number and date.'),
899        required = False,
900        readonly = False,
901        )
902
903    employer_address = schema.Text(
904        title = _(u'Employer'),
905        description= _('Enter name and address of employer.'),
906        required = False,
907        )
908
909    internee_name = schema.TextLine(
910        title = _(u'Internee Name'),
911        required = False,
912        readonly = False,
913        )
914
915    internee_address = schema.Text(
916        title = _(u'Internee Address'),
917        required = False,
918        )
919
920    provisional_registration = schema.TextLine(
921        title = _(u'Provisional Registration'),
922        description= _('Enter number and date of certificate of '
923                       'provisional regsitration of the internee.'),
924        required = False,
925        readonly = False,
926        )
927
928    educational_institution = schema.Text(
929        title = _(u'Educational Institution Attended'),
930        description= _('Enter name, address of institution and period of attendance.'),
931        required = False,
932        readonly = False,
933        )
934
935    educational_qualification = schema.TextLine(
936        title = _(u'Qualification'),
937        description= _('Enter qualification obtained.'),
938        required = False,
939        readonly = False,
940        )
941
942    supervisor = schema.TextLine(
943        title = _(u'Supervising Pharmacist (Preceptor)'),
944        required = False,
945        readonly = False,
946        )
947
948    supervisor_designation = schema.TextLine(
949        title = _(u'Designation'),
950        description= _('Enter designation of supervisor.'),
951        required = False,
952        readonly = False,
953        )
954
955    supervisor_year = schema.TextLine(
956        title = _(u'Year of Qualification'),
957        description= _('Enter year of qualification of supervisor.'),
958        required = False,
959        readonly = False,
960        )
961
962    supervisor_regnumber = schema.TextLine(
963        title = _(u'Registration Number'),
964        description= _('Enter registration number of supervisor.'),
965        required = False,
966        readonly = False,
967        )
968
969    license_regnumber = schema.TextLine(
970        title = _(u'Annual License to Practice'),
971        description= _('Enter number and date of annual license to practice '
972                       'of supervisor.'),
973        required = False,
974        readonly = False,
975        )
976
977
978    scope_practice = schema.List(
979        title = _(u'Scope of Practice'),
980        value_type = schema.Choice(source=PracticeSource()),
981        description= _('Select scopes of pharmaceutical practice currently '
982                       'undertaken at the institution.'),
983        required = False,
984        default = [],
985        )
986
987    date_of_commencement = FormattedDate(
988        title = _(u'Date of Commencement'),
989        description = _(u'Enter date of commencement of internship.'),
990        required = False,
991        show_year = True,
992        )
993
994class IAPPITContractOfficialUse(IIkobaObject):
995    """Interface for editing APPIT official use data.
996
997    """
998
999    comment = schema.Text(
1000        title= _('Reason for rejection'),
1001        required = False,
1002        )
1003
1004
1005class IAPPITContractProcess(IAPPITContract, IAPPITContractOfficialUse):
1006    """Interface for processing APPIT data.
1007    """
1008
1009    product_options = schema.List(
1010        title = _(u'Options/Fees'),
1011        value_type = ProductOptionField(),
1012        required = False,
1013        readonly = False,
1014        default = [],
1015        )
1016
1017class IAPPITContractEdit(IAPPITContract):
1018    """Interface for editing APPIT data by customers.
1019
1020    """
1021
1022class IRPTContract(IContract):
1023    """A Registration as a Pharmacy Technician contract.
1024
1025    """
1026
1027    nationality = schema.Choice(
1028        vocabulary = nats_vocab,
1029        title = _(u'Nationality'),
1030        required = False,
1031        )
1032
1033    nationality = schema.Choice(
1034        vocabulary = nats_vocab,
1035        title = _(u'Nationality'),
1036        required = False,
1037        )
1038
1039    nationality_aquired = schema.Choice(
1040        values=[_(u'birth'), _(u'naturalization'), _(u'marriage')],
1041        title = _(u'Nationality acquired by'),
1042        required = False,
1043        )
1044
1045    lga = schema.Choice(
1046        source = LGASource(),
1047        title = _(u'State / LGA'),
1048        required = False,
1049        )
1050
1051    office_address = schema.Text(
1052        title = _(u'Offices or Business Address'),
1053        required = False,
1054        )
1055
1056    home_address = schema.Text(
1057        title = _(u'Permanent Home Address'),
1058        required = False,
1059        )
1060
1061    schools_attended = schema.Text(
1062        title = _(u'Schools Attended'),
1063        description = _('Enter:<br />'
1064                        '(1) name of primary school, period of attendance<br />'
1065                        '(2) name of secondary school, period of attendance<br />'
1066                        '(3) name of post-secondary school, period of attendance'),
1067        required = False,
1068        )
1069
1070    subjects = schema.List(
1071        title = _(u'Subjects'),
1072        value_type = ResultEntryField(),
1073        required = False,
1074        readonly = False,
1075        default = [],
1076        )
1077
1078    referee1_name = schema.TextLine(
1079        title = _(u'First Referee Name'),
1080        description= _('This referee must be a pharmacist.'),
1081        required = False,
1082        readonly = False,
1083        )
1084
1085    referee1_address = schema.Text(
1086        title = _(u'First Referee Address'),
1087        required = False,
1088        readonly = False,
1089        )
1090
1091    referee2_name = schema.TextLine(
1092        title = _(u'Second Referee Name'),
1093        required = False,
1094        readonly = False,
1095        )
1096
1097    referee2_address = schema.Text(
1098        title = _(u'Second Referee Address'),
1099        required = False,
1100        readonly = False,
1101        )
1102
1103
1104class IRPTContractOfficialUse(IIkobaObject):
1105    """Interface for editing RPT official use data.
1106
1107    """
1108
1109    comment = schema.Text(
1110        title= _('Reason for rejection'),
1111        required = False,
1112        )
1113
1114
1115class IRPTContractProcess(IRPTContract, IRPTContractOfficialUse):
1116    """Interface for processing RPT data.
1117    """
1118
1119    product_options = schema.List(
1120        title = _(u'Options/Fees'),
1121        value_type = ProductOptionField(),
1122        required = False,
1123        readonly = False,
1124        default = [],
1125        )
1126
1127class IRPTContractEdit(IRPTContract):
1128    """Interface for editing RPT data by customers.
1129
1130    """
1131
1132class IAPPTContract(IContract):
1133    """An Annual Permit for Pharmacy Technician contract.
1134
1135    """
1136
1137    nationality = schema.Choice(
1138        vocabulary = nats_vocab,
1139        title = _(u'Nationality'),
1140        required = False,
1141        )
1142
1143    lga = schema.Choice(
1144        source = LGASource(),
1145        title = _(u'State / LGA'),
1146        required = False,
1147        )
1148
1149    office_address = schema.Text(
1150        title = _(u'Offices or Business Address'),
1151        required = False,
1152        )
1153
1154    employment = schema.Text(
1155        title = _('Employment'),
1156        description = _('Enter the name and address of where you '
1157                       'was employed last year.'),
1158        required = False,
1159        )
1160
1161    supervisor = schema.TextLine(
1162        title = _(u'Supervisor'),
1163        description= _('Who was your supervisor?'),
1164        required = False,
1165        readonly = False,
1166        )
1167
1168    supervisor_licensenumber = schema.TextLine(
1169        title = _(u'Supervisor License Number'),
1170        required = False,
1171        readonly = False,
1172        )
1173
1174    reason_leaving = schema.Text(
1175        title = _(u'Reason for Leaving'),
1176        description= _('Tell the reason for leaving employment last '
1177                       'year (if applicable).'),
1178        required = False,
1179        readonly = False,
1180        )
1181
1182    courses_attended = schema.Text(
1183        title = _(u'Courses, Workshops etc. Attended'),
1184        required = False,
1185        readonly = False,
1186        )
1187
1188
1189class IAPPTContractOfficialUse(IIkobaObject):
1190    """Interface for editing APPT official use data.
1191
1192    """
1193
1194    comment = schema.Text(
1195        title= _('Reason for rejection'),
1196        required = False,
1197        )
1198
1199
1200class IAPPTContractProcess(IAPPTContract, IAPPTContractOfficialUse):
1201    """Interface for processing APPT data.
1202    """
1203
1204    product_options = schema.List(
1205        title = _(u'Options/Fees'),
1206        value_type = ProductOptionField(),
1207        required = False,
1208        readonly = False,
1209        default = [],
1210        )
1211
1212class IAPPTContractEdit(IAPPTContract):
1213    """Interface for editing APPT data by customers.
1214
1215    """
Note: See TracBrowser for help on using the repository browser.