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

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

Prepare products and contracts for annual payments.

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