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

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

Fix typo.

  • Property svn:keywords set to Id
File size: 32.0 KB
Line 
1## $Id: interfaces.py 12618 2015-02-14 17:28:08Z 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        required = False,
336        readonly = False,
337        )
338
339    referee1_address = schema.Text(
340        title = _(u'First Referee Address'),
341        required = False,
342        readonly = False,
343        )
344
345    referee1_license = schema.TextLine(
346        title = _(u'First Referee License Number'),
347        required = False,
348        readonly = False,
349        )
350
351    referee2_name = schema.TextLine(
352        title = _(u'Second Referee Name'),
353        required = False,
354        readonly = False,
355        )
356
357    referee2_address = schema.Text(
358        title = _(u'Second Referee Address'),
359        required = False,
360        readonly = False,
361        )
362
363    referee2_license = schema.TextLine(
364        title = _(u'Second Referee License Number'),
365        required = False,
366        readonly = False,
367        )
368
369    internship_address = schema.Text(
370        title = _(u'Internship'),
371        description = u'Enter name and address of company where you want to serve your internship.',
372        required = False,
373        readonly = False,
374        )
375
376
377
378class IRPRContractOfficialUse(IIkobaObject):
379    """Interface for editing RPR official use data.
380
381    """
382
383    comment = schema.Text(
384        title= _('Reason for rejection'),
385        required = False,
386        )
387
388
389class IRPRContractProcess(IRPRContract, IRPRContractOfficialUse):
390    """Interface for processing RPR data.
391    """
392
393    product_options = schema.List(
394        title = _(u'Options/Fees'),
395        value_type = ProductOptionField(),
396        required = False,
397        readonly = False,
398        default = [],
399        )
400
401class IRPRContractEdit(IRPRContract):
402    """Interface for editing RPR data by customers.
403
404    """
405
406    certificates_object = schema.Choice(
407        title = _(u'Certificates'),
408        description = u'Select the document which contains scanned copies '
409                      u'of your certificates. You must create such a '
410                      u'document first.',
411        source = CustomerDocumentSource(),
412        required = True,
413        )
414
415IRPRContractEdit['certificates_object'].order = IRPRContract[
416    'certificates_object'].order
417
418
419class IRPCContract(IContract):
420    """A Registration as Pharmaceutical Chemist contract.
421
422    """
423
424    nationality = schema.Choice(
425        vocabulary = nats_vocab,
426        title = _(u'Nationality'),
427        required = False,
428        )
429
430    nationality_aquired = schema.Choice(
431        values=[_(u'birth'), _(u'naturalization')],
432        title = _(u'Nationality acquired by'),
433        required = False,
434        )
435
436    res_address = schema.Text(
437        title = _(u'Residential Address'),
438        required = False,
439        )
440
441    qualifications = schema.Text(
442        title = _(u'Qualifications'),
443        description = u'Enter a list of certificates obtained.',
444        required = False,
445        readonly = False,
446        )
447
448    certificates_object = schema.Choice(
449        title = _(u'Certificates'),
450        description = u'Select the document which contains scanned copies '
451                      u'of your certificates. You must create such a '
452                      u'document first.',
453        source = CustomerDocumentSource(),
454        required = False,
455        )
456
457    referee1_name = schema.TextLine(
458        title = _(u'First Referee Name'),
459        required = False,
460        readonly = False,
461        )
462
463    referee1_address = schema.Text(
464        title = _(u'First Referee Address'),
465        required = False,
466        readonly = False,
467        )
468
469    referee1_license = schema.TextLine(
470        title = _(u'First Referee License Number'),
471        required = False,
472        readonly = False,
473        )
474
475    referee2_name = schema.TextLine(
476        title = _(u'Second Referee Name'),
477        required = False,
478        readonly = False,
479        )
480
481    referee2_address = schema.Text(
482        title = _(u'Second Referee Address'),
483        required = False,
484        readonly = False,
485        )
486
487    referee2_license = schema.TextLine(
488        title = _(u'Second Referee License Number'),
489        required = False,
490        readonly = False,
491        )
492
493    internship = schema.Text(
494        title = _(u'Internship'),
495        description = u'Enter name and address of the company where you '
496                      u'served your internship, the name of the approved '
497                      u'registered pharmacist and the period of your service.',
498        required = False,
499        readonly = False,
500        )
501
502    nigerian_residence = FormattedDate(
503        title = _(u'Residence in Nigeria'),
504        description = u'Enter the date since when you have continously '
505                      u'resided in Nigeria.',
506        required = False,
507        show_year = True,
508        )
509
510    witness = schema.Text(
511        title = _(u'Witness'),
512        description = u'Enter name and adress of witness.',
513        required = False,
514        )
515
516
517class IRPCContractOfficialUse(IIkobaObject):
518    """Interface for editing RPC official use data.
519
520    """
521
522    comment = schema.Text(
523        title= _('Reason for rejection'),
524        required = False,
525        )
526
527
528class IRPCContractProcess(IRPCContract, IRPCContractOfficialUse):
529    """Interface for processing RPC data.
530    """
531
532    product_options = schema.List(
533        title = _(u'Options/Fees'),
534        value_type = ProductOptionField(),
535        required = False,
536        readonly = False,
537        default = [],
538        )
539
540class IRPCContractEdit(IRPCContract):
541    """Interface for editing RPC data by customers.
542
543    """
544
545    certificates_object = schema.Choice(
546        title = _(u'Certificates'),
547        description = u'Select the document which contains scanned copies '
548                      u'of your certificates. You must create such a '
549                      u'document first.',
550        source = CustomerDocumentSource(),
551        required = True,
552        )
553
554IRPCContractEdit['certificates_object'].order = IRPCContract[
555    'certificates_object'].order
556
557class IIPPMVLContract(IContract):
558    """A Issuance of Patent and Proprietary Medicines Vendors License.
559
560    """
561
562    res_address = schema.Text(
563        title = _(u'Residential Address'),
564        required = False,
565        )
566
567    occupation = schema.TextLine(
568        title = _(u'Occupation'),
569        required = False,
570        readonly = False,
571        )
572
573    qualifications = schema.Text(
574        title = _(u'Educational Qualifications'),
575        description = u'Enter a list of certificates obtained.',
576        required = False,
577        readonly = False,
578        )
579
580    certificates_object = schema.Choice(
581        title = _(u'Certificates/Credentials'),
582        description = u'Select the pdf document which contains scanned copies '
583                      u'of your certificates. You must create such a '
584                      u'document first.',
585        source = CustomerDocumentSource(),
586        required = False,
587        )
588
589    incometax_object = schema.Choice(
590        title = _(u'Income Tax Clearance'),
591        description = u'Select the pdf document which contains scanned copies '
592                      u'of your income tax clearance for the past three years. '
593                      u'You must create such a document first.',
594        source = CustomerDocumentSource(),
595        required = False,
596        )
597
598    shop_address = schema.Text(
599        title = _(u'Patent Vendor\'s Shop'),
600        description = u'Enter name and address of patent vendor\'s shop.',
601        required = False,
602        )
603
604    shop_lga = schema.Choice(
605        source = LGASource(),
606        title = _(u'State / LGA'),
607        required = False,
608        )
609
610    shop_email = schema.TextLine(
611        title = _(u'Shop Email Address'),
612        required = False,
613        constraint=validate_email,
614        )
615
616    shop_phone = PhoneNumber(
617        title = _(u'Shop Phone'),
618        description = u'',
619        required = False,
620        )
621
622    old_or_new = schema.Choice(
623        values=[_(u'old'), _(u'new')],
624        title = _(u'Old or New Shop'),
625        required = False,
626        )
627
628    PPMVL_number = schema.TextLine(
629        title = _(u'PPMVL Data'),
630        description = u'If an old store, state PPMVL number and date of issue.',
631        required = False,
632        readonly = False,
633        )
634
635    referee1_name = schema.TextLine(
636        title = _(u'First Referee Name'),
637        required = False,
638        readonly = False,
639        )
640
641    referee1_address = schema.Text(
642        title = _(u'First Referee Address'),
643        required = False,
644        readonly = False,
645        )
646
647    referee1_license = schema.TextLine(
648        title = _(u'First Referee License Number'),
649        required = False,
650        readonly = False,
651        )
652
653    referee1_occupation = schema.TextLine(
654        title = _(u'First Referee Occupation'),
655        required = False,
656        readonly = False,
657        )
658
659    referee2_name = schema.TextLine(
660        title = _(u'Second Referee Name'),
661        required = False,
662        readonly = False,
663        )
664
665    referee2_address = schema.Text(
666        title = _(u'Second Referee Address'),
667        required = False,
668        readonly = False,
669        )
670
671    referee2_license = schema.TextLine(
672        title = _(u'Second Referee License Number'),
673        required = False,
674        readonly = False,
675        )
676
677    referee2_occupation = schema.TextLine(
678        title = _(u'Second Referee Occupation'),
679        required = False,
680        readonly = False,
681        )
682
683
684class IIPPMVLContractOfficialUse(IIkobaObject):
685    """Interface for editing IPPMVL official use data.
686
687    """
688
689    comment = schema.Text(
690        title= _('Reason for rejection'),
691        required = False,
692        )
693
694
695class IIPPMVLContractProcess(IIPPMVLContract, IIPPMVLContractOfficialUse):
696    """Interface for processing IPPMVL data.
697    """
698
699    product_options = schema.List(
700        title = _(u'Options/Fees'),
701        value_type = ProductOptionField(),
702        required = False,
703        readonly = False,
704        default = [],
705        )
706
707class IIPPMVLContractEdit(IIPPMVLContract):
708    """Interface for editing IPPMVL data by customers.
709
710    """
711
712    certificates_object = schema.Choice(
713        title = _(u'Certificates'),
714        description = u'Select the document which contains scanned copies '
715                      u'of your certificates. You must create such a '
716                      u'document first.',
717        source = CustomerDocumentSource(),
718        required = True,
719        )
720
721    incometax_object = schema.Choice(
722        title = _(u'Income Tax Clearance'),
723        description = u'Select the pdf document which contains scanned copies '
724                      u'of your income tax clearance for the past three years. '
725                      u'You must create such a document first.',
726        source = CustomerDocumentSource(),
727        required = True,
728        )
729
730IIPPMVLContractEdit['certificates_object'].order = IIPPMVLContract[
731    'certificates_object'].order
732
733IIPPMVLContractEdit['incometax_object'].order = IIPPMVLContract[
734    'incometax_object'].order
735
736class IRPPMVLContract(IContract):
737    """A Renewal of Patent and Proprietary Medicines Vendors License.
738
739    """
740
741    res_address = schema.Text(
742        title = _(u'Residential Address'),
743        required = False,
744        )
745
746    occupation = schema.TextLine(
747        title = _(u'Occupation'),
748        required = False,
749        readonly = False,
750        )
751
752    qualifications = schema.Text(
753        title = _(u'Educational Qualifications'),
754        description = u'Enter a list of certificates obtained.',
755        required = False,
756        readonly = False,
757        )
758
759    shop_address = schema.Text(
760        title = _(u'Patent Vendor\'s Shop'),
761        description = u'Enter name and address of patent vendor\'s shop.',
762        required = False,
763        )
764
765    ppmv_signpost = schema.TextLine(
766        title = _(u'PPMV Sign-post Number'),
767        required = False,
768        readonly = False,
769        )
770
771    shop_lga = schema.Choice(
772        source = LGASource(),
773        title = _(u'State / LGA'),
774        required = False,
775        )
776
777    shop_email = schema.TextLine(
778        title = _(u'Shop Email Address'),
779        required = False,
780        constraint=validate_email,
781        )
782
783    shop_phone = PhoneNumber(
784        title = _(u'Shop Phone'),
785        description = u'',
786        required = False,
787        )
788
789    PPMVL_number = schema.TextLine(
790        title = _(u'PPMVL Data'),
791        description = u'State PPMVL number and date of issue of last license.',
792        required = False,
793        readonly = False,
794        )
795
796    referee1_name = schema.TextLine(
797        title = _(u'First Referee Name'),
798        required = False,
799        readonly = False,
800        )
801
802    referee1_address = schema.Text(
803        title = _(u'First Referee Address'),
804        required = False,
805        readonly = False,
806        )
807
808    referee1_license = schema.TextLine(
809        title = _(u'First Referee License Number'),
810        required = False,
811        readonly = False,
812        )
813
814    referee1_occupation = schema.TextLine(
815        title = _(u'First Referee Occupation'),
816        required = False,
817        readonly = False,
818        )
819
820    referee2_name = schema.TextLine(
821        title = _(u'Second Referee Name'),
822        required = False,
823        readonly = False,
824        )
825
826    referee2_address = schema.Text(
827        title = _(u'Second Referee Address'),
828        required = False,
829        readonly = False,
830        )
831
832    referee2_license = schema.TextLine(
833        title = _(u'Second Referee License Number'),
834        required = False,
835        readonly = False,
836        )
837
838    referee2_occupation = schema.TextLine(
839        title = _(u'Second Referee Occupation'),
840        required = False,
841        readonly = False,
842        )
843
844
845class IRPPMVLContractOfficialUse(IIkobaObject):
846    """Interface for editing RPPMVL official use data.
847
848    """
849
850    comment = schema.Text(
851        title= _('Reason for rejection'),
852        required = False,
853        )
854
855
856class IRPPMVLContractProcess(IRPPMVLContract, IRPPMVLContractOfficialUse):
857    """Interface for processing RPPMVL data.
858    """
859
860    product_options = schema.List(
861        title = _(u'Options/Fees'),
862        value_type = ProductOptionField(),
863        required = False,
864        readonly = False,
865        default = [],
866        )
867
868class IRPPMVLContractEdit(IRPPMVLContract):
869    """Interface for editing RPPMVL data by customers.
870
871    """
872
873class IAPPITContract(IContract):
874    """A Accepting Pupil Pharmacist for Internship Training contract.
875
876    """
877
878    institution_address = schema.Text(
879        title = _(u'Institution'),
880        description= _('Enter name and address of institution '
881                       'where internee will serve.'),
882        required = False,
883        )
884
885    approved = schema.Bool(
886        title= _('Institution Approved'),
887        description= _('Tick box if the institution is approved for internship.'),
888        required = False,
889        )
890
891    inst_certificate = schema.TextLine(
892        title = _(u'Institution Certificate'),
893        description= _('Enter the institutions certificate number and date.'),
894        required = False,
895        readonly = False,
896        )
897
898    employer_address = schema.Text(
899        title = _(u'Employer'),
900        description= _('Enter name and address of employer.'),
901        required = False,
902        )
903
904    internee_name = schema.TextLine(
905        title = _(u'Internee Name'),
906        required = False,
907        readonly = False,
908        )
909
910    internee_address = schema.Text(
911        title = _(u'Internee Address'),
912        required = False,
913        )
914
915    provisional_registration = schema.TextLine(
916        title = _(u'Provisional Registration'),
917        description= _('Enter number and date of certificate of '
918                       'provisional regsitration of the internee.'),
919        required = False,
920        readonly = False,
921        )
922
923    educational_institution = schema.Text(
924        title = _(u'Educational Institution Attended'),
925        description= _('Enter name, address of institution and period of attendance.'),
926        required = False,
927        readonly = False,
928        )
929
930    educational_qualification = schema.TextLine(
931        title = _(u'Qualification'),
932        description= _('Enter qualification obtained.'),
933        required = False,
934        readonly = False,
935        )
936
937    supervisor = schema.TextLine(
938        title = _(u'Supervising Pharmacist (Preceptor)'),
939        required = False,
940        readonly = False,
941        )
942
943    supervisor_designation = schema.TextLine(
944        title = _(u'Designation'),
945        description= _('Enter designation of supervisor.'),
946        required = False,
947        readonly = False,
948        )
949
950    supervisor_year = schema.TextLine(
951        title = _(u'Year of Qualification'),
952        description= _('Enter year of qualification of supervisor.'),
953        required = False,
954        readonly = False,
955        )
956
957    supervisor_regnumber = schema.TextLine(
958        title = _(u'Registration Number'),
959        description= _('Enter registration number of supervisor.'),
960        required = False,
961        readonly = False,
962        )
963
964    license_regnumber = schema.TextLine(
965        title = _(u'Annual License to Practice'),
966        description= _('Enter number and date of annual license to practice '
967                       'of supervisor.'),
968        required = False,
969        readonly = False,
970        )
971
972
973    scope_practice = schema.List(
974        title = _(u'Scope of Practice'),
975        value_type = schema.Choice(source=PracticeSource()),
976        description= _('Select scopes of pharmaceutical practice currently '
977                       'undertaken at the institution.'),
978        required = False,
979        default = [],
980        )
981
982    date_of_commencement = FormattedDate(
983        title = _(u'Date of Commencement'),
984        description = _(u'Enter date of commencement of internship.'),
985        required = False,
986        show_year = True,
987        )
988
989class IAPPITContractOfficialUse(IIkobaObject):
990    """Interface for editing APPIT official use data.
991
992    """
993
994    comment = schema.Text(
995        title= _('Reason for rejection'),
996        required = False,
997        )
998
999
1000class IAPPITContractProcess(IAPPITContract, IAPPITContractOfficialUse):
1001    """Interface for processing APPIT data.
1002    """
1003
1004    product_options = schema.List(
1005        title = _(u'Options/Fees'),
1006        value_type = ProductOptionField(),
1007        required = False,
1008        readonly = False,
1009        default = [],
1010        )
1011
1012class IAPPITContractEdit(IAPPITContract):
1013    """Interface for editing APPIT data by customers.
1014
1015    """
1016
1017class IRPTContract(IContract):
1018    """A Registration as a Pharmacy Technician contract.
1019
1020    """
1021
1022    state_of_origin = schema.Choice(
1023        vocabulary = nats_vocab,
1024        title = _(u'State of Origin'),
1025        required = False,
1026        )
1027
1028    nationality = schema.Choice(
1029        vocabulary = nats_vocab,
1030        title = _(u'Nationality'),
1031        required = False,
1032        )
1033
1034    nationality_aquired = schema.Choice(
1035        values=[_(u'birth'), _(u'naturalization')],
1036        title = _(u'Nationality acquired by'),
1037        required = False,
1038        )
1039
1040    lga = schema.Choice(
1041        source = LGASource(),
1042        title = _(u'State / LGA'),
1043        required = False,
1044        )
1045
1046    office_address = schema.Text(
1047        title = _(u'Offices or Business Address'),
1048        required = False,
1049        )
1050
1051    home_address = schema.Text(
1052        title = _(u'Permanent Home Address'),
1053        required = False,
1054        )
1055
1056    res_address = schema.Text(
1057        title = _(u'Residential Address'),
1058        required = False,
1059        )
1060
1061    schools_attended = schema.Text(
1062        title = _(u'Schools Attended'),
1063        description = _('Enter:<br />'
1064                        '(1) name of primary school, period of attendance<br />'
1065                        '(2) name of secondary school, period of attendance<br />'
1066                        '(3) name of post-secondary school, period of attendance'),
1067        required = False,
1068        )
1069
1070    subjects = schema.List(
1071        title = _(u'Subjects'),
1072        value_type = ResultEntryField(),
1073        required = False,
1074        readonly = False,
1075        default = [],
1076        )
1077
1078    referee1_name = schema.TextLine(
1079        title = _(u'First Referee Name'),
1080        required = False,
1081        readonly = False,
1082        )
1083
1084    referee1_address = schema.Text(
1085        title = _(u'First Referee Address'),
1086        required = False,
1087        readonly = False,
1088        )
1089
1090    referee2_name = schema.TextLine(
1091        title = _(u'Second Referee Name'),
1092        required = False,
1093        readonly = False,
1094        )
1095
1096    referee2_address = schema.Text(
1097        title = _(u'Second Referee Address'),
1098        required = False,
1099        readonly = False,
1100        )
1101
1102
1103class IRPTContractOfficialUse(IIkobaObject):
1104    """Interface for editing RPT official use data.
1105
1106    """
1107
1108    comment = schema.Text(
1109        title= _('Reason for rejection'),
1110        required = False,
1111        )
1112
1113
1114class IRPTContractProcess(IRPTContract, IRPTContractOfficialUse):
1115    """Interface for processing RPT data.
1116    """
1117
1118    product_options = schema.List(
1119        title = _(u'Options/Fees'),
1120        value_type = ProductOptionField(),
1121        required = False,
1122        readonly = False,
1123        default = [],
1124        )
1125
1126class IRPTContractEdit(IRPTContract):
1127    """Interface for editing RPT data by customers.
1128
1129    """
1130
1131class IAPPTContract(IContract):
1132    """An Annual Permit for Pharmacy Technician contract.
1133
1134    """
1135
1136    state_of_origin = schema.Choice(
1137        vocabulary = nats_vocab,
1138        title = _(u'State of Origin'),
1139        required = False,
1140        )
1141
1142    lga = schema.Choice(
1143        source = LGASource(),
1144        title = _(u'State / LGA'),
1145        required = False,
1146        )
1147
1148    office_address = schema.Text(
1149        title = _(u'Offices or Business Address'),
1150        required = False,
1151        )
1152
1153    res_address = schema.Text(
1154        title = _(u'Residential Address'),
1155        required = False,
1156        )
1157
1158    employed = schema.Bool(
1159        title= _('Employment'),
1160        description= _('Tick box if you were employed last year.'),
1161        required = False,
1162        )
1163
1164    supervisor = schema.TextLine(
1165        title = _(u'Supervisor'),
1166        description= _('Enter name of supervisor.'),
1167        required = False,
1168        readonly = False,
1169        )
1170
1171    supervisor_licensenumber = schema.TextLine(
1172        title = _(u'Supervisor License Number'),
1173        required = False,
1174        readonly = False,
1175        )
1176
1177    reason_leaving = schema.Text(
1178        title = _(u'Reason for Leaving'),
1179        description= _('Tell the reason for leaving employment last '
1180                       'year (if applicable)'),
1181        required = False,
1182        readonly = False,
1183        )
1184
1185
1186    courses_attended = schema.Text(
1187        title = _(u'Courses, Workshops etc. Attended'),
1188        required = False,
1189        readonly = False,
1190        )
1191
1192
1193class IAPPTContractOfficialUse(IIkobaObject):
1194    """Interface for editing APPT official use data.
1195
1196    """
1197
1198    comment = schema.Text(
1199        title= _('Reason for rejection'),
1200        required = False,
1201        )
1202
1203
1204class IAPPTContractProcess(IAPPTContract, IAPPTContractOfficialUse):
1205    """Interface for processing APPT data.
1206    """
1207
1208    product_options = schema.List(
1209        title = _(u'Options/Fees'),
1210        value_type = ProductOptionField(),
1211        required = False,
1212        readonly = False,
1213        default = [],
1214        )
1215
1216class IAPPTContractEdit(IAPPTContract):
1217    """Interface for editing APPT data by customers.
1218
1219    """
Note: See TracBrowser for help on using the repository browser.