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

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

Fix syntax error.

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