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

Last change on this file since 17977 was 14023, checked in by Henrik Bettermann, 8 years ago

Use defaultFactory.

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