diff --git a/calebasse/dossiers/static/dossiers/cerfa_50742_03_prescription_transport.pdf b/calebasse/dossiers/static/dossiers/cerfa_50742_03_prescription_transport.pdf index 81d9ec81..ed5e3938 100644 Binary files a/calebasse/dossiers/static/dossiers/cerfa_50742_03_prescription_transport.pdf and b/calebasse/dossiers/static/dossiers/cerfa_50742_03_prescription_transport.pdf differ diff --git a/calebasse/dossiers/templates/dossiers/generate_transport_prescription_form.html b/calebasse/dossiers/templates/dossiers/generate_transport_prescription_form.html index 38202da1..90566f2a 100644 --- a/calebasse/dossiers/templates/dossiers/generate_transport_prescription_form.html +++ b/calebasse/dossiers/templates/dossiers/generate_transport_prescription_form.html @@ -33,7 +33,7 @@ (Maximum 3 lignes de 110 caractères.)
Transport aller Transport retour Transport aller-retour
- Transport itératif Nombre + Si transport en série, indiquez le nombre

Ce transport est-il lié à une condition de prise en charge à 100% ? (grossesse de plus de 6 mois, ALD exonérante, AT/MP, autre... Se référer à la notice)
@@ -54,7 +54,8 @@

Conditions particulières
- Appel du centre 15 Nécessité d'une asepsie rigoureuse + Nécessité d'une asepsie rigoureuse
+ Urgence attestée par le médecin prescripteur

Signature
diff --git a/calebasse/dossiers/transport.py b/calebasse/dossiers/transport.py index 4f5b4ea7..68c2697c 100644 --- a/calebasse/dossiers/transport.py +++ b/calebasse/dossiers/transport.py @@ -29,7 +29,6 @@ def render_transport(patient, address, data={}): 'TRAJET_CHOICE_1': 'trajet_choice_1' in data, 'TRAJET_CHOICE_2': 'trajet_choice_2' in data, 'TRAJET_CHOICE_3': 'trajet_choice_3' in data, - 'TRAJET_CHOICE_4': 'trajet_choice_4' in data, 'TRAJET_NUMBER': data.get('trajet_number', ''), 'PC_CHOICE_1': 'pc_choice_1' in data, 'PC_CHOICE_2': 'pc_choice_2' in data, diff --git a/calebasse/dossiers/transport_template.py b/calebasse/dossiers/transport_template.py index 36b607be..31b1aa0a 100644 --- a/calebasse/dossiers/transport_template.py +++ b/calebasse/dossiers/transport_template.py @@ -13,130 +13,127 @@ from ..pdftk import PdfTk class TransportTemplate(object): fields = { 'NOM_BENEFICIAIRE': { - 'pos': (302, 186), + 'pos': (302, 172), }, 'PRENOM_BENEFICIAIRE': { - 'pos': (136, 200), + 'pos': (136, 186), }, 'DATE': { - 'pos': (532, 597), - 'size': 8, + 'pos': (530, 582), + 'size': 7, }, 'LIEU': { - 'pos': (596, 597), + 'pos': (591, 583), + 'size': 7, }, 'IDENTIFICATION_ETABLISSEMENT': { 'type': 'multiline', - 'pos': (510, 652), + 'pos': (510, 638), }, 'NIR_ASSURE': { - 'pos': (325, 800), + 'pos': (325, 781), 'size': 10, }, 'NIR_KEY_ASSURE': { - 'pos': (527, 800), + 'pos': (527, 781), 'size': 10, }, 'NOM_ASSURE': { - 'pos': (492, 825), + 'pos': (492, 805), }, 'CODE_ORGANISME_1': { - 'pos': (328, 850), + 'pos': (328, 832), 'size': 10, }, 'CODE_ORGANISME_2': { - 'pos': (357, 850), + 'pos': (357, 832), 'size': 10, }, 'CODE_ORGANISME_3': { - 'pos': (401, 850), + 'pos': (401, 832), 'size': 10, }, 'ADRESSE_BENEFICIAIRE': { - 'pos': (92, 891), + 'pos': (94, 873), }, 'SITUATION_CHOICE_1': { - 'pos': (393, 264), + 'pos': (386, 241), 'type': 'bool', }, 'SITUATION_CHOICE_2': { - 'pos': (393, 280), + 'pos': (386, 262), 'type': 'bool', }, 'SITUATION_CHOICE_3': { - 'pos': (719, 264), + 'pos': (711, 240), 'type': 'bool', }, 'SITUATION_CHOICE_4': { - 'pos': (719, 280), + 'pos': (711, 259), 'type': 'bool', }, 'SITUATION_DATE': { - 'pos': (610, 299), + 'pos': (606, 280), 'size': 8, }, 'TRAJET_TEXT': { - 'pos': (84, 340), + 'pos': (84, 320), 'size': 8, }, 'TRAJET_CHOICE_1': { - 'pos': (201, 396), + 'pos': (193, 375), 'type': 'bool', }, 'TRAJET_CHOICE_2': { - 'pos': (454, 396), + 'pos': (441, 375), 'type': 'bool', }, 'TRAJET_CHOICE_3': { - 'pos': (719, 396), - 'type': 'bool', - }, - 'TRAJET_CHOICE_4': { - 'pos': (201, 419), + 'pos': (711, 376), 'type': 'bool', }, 'TRAJET_NUMBER': { - 'pos': (305, 409), + 'pos': (308, 383), 'size': 8, }, 'PC_CHOICE_1': { - 'pos': (567, 435), + 'pos': (564, 410), 'type': 'bool', }, 'PC_CHOICE_2': { - 'pos': (642, 435), + 'pos': (638, 410), 'type': 'bool', }, 'MODE_CHOICE_1': { - 'pos': (321, 484), + 'pos': (320, 473), 'type': 'bool', }, 'MODE_CHOICE_2': { - 'pos': (321, 499), + 'pos': (320, 488), 'type': 'bool', }, 'MODE_CHOICE_3': { - 'pos': (321, 515), + 'pos': (320, 504), 'type': 'bool', }, 'MODE_CHOICE_4': { - 'pos': (568, 528), + 'pos': (564, 517), 'type': 'bool', }, 'MODE_CHOICE_5': { - 'pos': (642, 528), + 'pos': (638, 517), 'type': 'bool', }, 'MODE_CHOICE_6': { - 'pos': (321, 546), + 'pos': (320, 536), 'type': 'bool', }, 'CDTS_CHOICE_1': { - 'pos': (404, 565), + 'pos': (400, 552), 'type': 'bool', }, 'CDTS_CHOICE_2': { - 'pos': (567, 563), + 'pos': (661, 552), 'type': 'bool', }, } @@ -195,12 +192,26 @@ class TransportTemplate(object): for row in value: for x, v in zip(field['cols'], row): sub = { - 'pos': (offset + x, y), 'size': size, } self.draw_field(ctx, sub, v, 7) y += field['lineheight'] + def draw_grid(self, ctx): + ctx.set_source_rgb(0, 0, 0) + for i in range(0, 827, 100): + ctx.move_to(i, 5) + ctx.show_text(str(i // 100)); + ctx.move_to(i, 0) + ctx.line_to(i, 1169) + ctx.stroke() + for i in range(0, 1169, 100): + ctx.move_to(0, i-5) + ctx.show_text(str(i // 100)) + ctx.move_to(0, i) + ctx.line_to(827, i) + ctx.stroke() + def generate(self, content, delete=True): width, height = 827, 1169 with tempfile.NamedTemporaryFile(prefix=self.prefix,