This file is indexed.

/usr/share/freemedforms/forms/subforms/generic/fullidentity/central.xml is in freemedforms-emr-resources 0.9.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FreeMedForms>

<FreeMedForms>

  <formdescription>
    <!-- Non translatable values -->
    <authors>Eric Maeker, MD</authors>
    <version>0.9.4</version>
    <fmfv>0.8.4</fmfv>
    <cdate>2012-01-01</cdate>
    <lmdate>2014-07-22</lmdate>
    <icon>__theme__/identity.png</icon>
    <weblink></weblink>
    <bibliography/>

    <!-- Translatable values -->
    <license>GPLv3</license>
    <description lang="fr">Identité complète</description>
    <description lang="xx">Full identity</description>
    <category lang="xx">Generic tools</category>
    <category lang="fr">Outils généraux</category>
    <specialties lang="fr">Outils</specialties>
    <specialties lang="xx">Tools</specialties>

    <updateinfo>
      <updateversion from="0.8.4" to="0.9.1">
        <text lang="fr">
        Ajout du sous-formulaire: Données socio-démographiques
        Amélioration du formulaire de la personne de confiance
        </text>
        <text lang="xx">
        Adding sociodemgraphics subform
        Improvements of the trusted person subform
        </text>
      </updateversion>
      <updateversion from="0.8.2" to="0.8.4">
        <text lang="fr">
        Gestion de la représentation des données patient (nom du propriétaire du NSS)
        Par défaut, le patient est propriétaire du numéro de sécurité sociale.
        Ajout des masques HTML d'exportation et d'impression plus modernes.
        </text>
        <text lang="xx">
        Managing the patient data representation for the SocialNumber owner full name
        Adding modern HTML export and print masks.
        </text>
      </updateversion>
      <updateversion from="0.8.0" to="0.8.2">
        <text lang="fr">
        Ajout du formulaire de la personne de confiance&lt;br />
        Utilisation des DetailsWidget pour limiter la taille de la vue&lt;br />
        Ajout de l'auto-remplissage du formulaire de déclaration du médecin traitant.
        Cette fonctionnalité nécessite l'installation d'un paquet de données
        disponible auprès de l'association asso.freemedforms.com&lt;br />
        </text>
        <text lang="xx">
        Adding new trusted person subform&lt;br />
        Usign DetailsWidgets to minimize the view size&lt;br />
        </text>
      </updateversion>
      <updateversion from="0.7.0" to="0.8.0">
        <text lang="fr">
        Ajout du numéro de téléphone mobile&lt;br />
        Bouton 'envoyer un courriel' connecté&lt;br />
        N'affiche pas l'entête du formulaire&lt;br />
        Défini le formulaire comme formulaire d'identité dans l'application&lt;br />
        Ajout des données professionnelles&lt;br />
        </text>
        <text lang="xx">
        Adding the mobile phone number&lt;br />
        'Send mail' button is now connected&lt;br />
        Hide the form header&lt;br />
        Define this form as the application identity form&lt;br />
        Adding professional data&lt;br />
        </text>
      </updateversion>
    </updateinfo>

  </formdescription>

  <MedForm name="Subs::Tools::IdentitySynopsis" uifilename="./ui/xx/identity.ui">
    <label lang="xx">Identity</label>
    <label lang="fr">Identité</label>
    <options>NoEpisode</options>
    <icon>__theme__/identity.png</icon>

      <MedForm name="Subs::Tools::Identity" uifilename="./ui/xx/identity.ui" isidentity="true">
        <label lang="xx">Identity</label>
        <label lang="fr">Identité</label>
        <options>unique;UseFormNameAsNameSpace;HideHeaderOnUniqueEpisode</options>
        <icon>__theme__/identity.png</icon>
        <file type="htmlprintmask">./html/xx/padtools_mask.html</file>
        <file type="htmlexportmask">./html/xx/padtools_mask.html</file>

        <Item type="detailswidget" name="IdentityDetails" uifilename="./ui/xx/ident.ui">
            <uilink label="" widget="" layout="identityLayout"/>
            <label lang="xx">Identity and address</label>
            <label lang="fr">Identité et adresse</label>
            <label lang="de">Identität und Anschrift</label>
            <label lang="es">Identidad y dirección</label>
            <options>SummaryFontBold;expanded</options>

            <Item type="identity" name="IdentityWidget">
                <uilink label="" widget="" layout="identityIncludeLayout"/>
                <label lang="xx">Full Identity</label>
                <label lang="fr">Identité</label>
                <options>with-address;with-photo</options>
            </Item>
        </Item>

        <Item type="detailswidget" name="FrDetails" uifilename="./ui/xx/social.ui">
          <uilink label="" widget="" layout="identityLayout"/>
          <country>FR</country>
          <label lang="xx">Social insurance</label>
          <label lang="fr">Sécurité sociale</label>
          <extralabel>{Subs::Tools::Identity::FrGroup::NSS}</extralabel>
          <column>1</column>
          <options>DontPrintEmptyValues;SummaryFontBold</options>

          <Item type="frenchnss" name="FrGroup::NSS">
            <uilink label="socialNumberLabel" widget="" layout="socialNumberLayout"/>
            <label lang="xx">Social insurance number</label>
            <label lang="fr">Numéro de sécurité sociale</label>
            <options>DontPrintEmptyValues</options>
            <patientdata>SocialNumber</patientdata>
          </Item>

          <Item type="check" name="FrGroup::IsNSSOwner">
            <uilink widget="isSINOwnerCheck"/>
            <label lang="xx">Patient is the social insurance number owner</label>
            <label lang="fr">Est le propriétaire du numéro de sécurité sociale</label>
            <options>DontPrintEmptyValues</options>
            <value><default>checked</default></value>
          </Item>

          <Item type="shorttext" name="FrGroup::OwnerName">
            <uilink label="ownerLabel" widget="ownerEdit"/>
            <label lang="xx">Social number owner</label>
            <label lang="fr">Propriétaire</label>
            <options>DontPrintEmptyValues</options>
            <patientdata>SocialNumberOwnerFullName</patientdata>
          </Item>

          <Item type="button" name="FrGroup::CreateDeclaration">
            <uilink widget="declaration"/>
            <label lang="xx">Formulaire Médecin Traitant</label>
            <ToolTip lang="xx">Formulaire Médecin Traitant</ToolTip>
            <icon>__theme__/carte_vitale.png</icon>
            <script>
              <onload>
                // Enabled this button only is the FreeMedForms PDF object is available
                freemedforms.forms.namespaceInUse = "Subs::Tools::Identity";
                var item = freemedforms.forms.item("FrGroup::CreateDeclaration");
                if (!item.isValid) {
                    print("Error in identity form");
                    return;
                }
                item.enabled = freemedforms.pdf.isAvailable;
              </onload>
              <onclicked>
                  function _identity_france_declaration_med_traitant()
                  {
                      // get the fremedforms pdf worker
                      var pdf = freemedforms.pdf;
                      if (!pdf.isAvailable) {
                          print("pdftk not available");
                          return;
                      }

                      // process data
                      var patient = freemedforms.patient;
                      if (!patient.isActive) {
                          print("not active patient");
                          return;
                      }

                      pdf.beginFdfEncoding();

                      freemedforms.forms.namespaceInUse = "Subs::Tools::Identity";
                      var isNssOwner = freemedforms.forms.item("FrGroup::IsNSSOwner");
                      if (!isNssOwner.isValid) {
                          print("isNSSOwner not available");
                          return;
                      }
                      var nss = freemedforms.forms.item("FrGroup::NSS");
                      if (!nss.isValid) {
                          print("NSS not available");
                          return;
                      }

                      pdf.addFdfValue("nom", patient.usualName + " " + patient.otherNames);
                      pdf.addFdfValue("prénom", patient.firstName);
                      pdf.addFdfValue("date naissance", freemedforms.tools.dateToString(patient.dateOfBirth, "ddMMyyyy"));
                      // TODO: split street into 2 max lines if required

                      var street = patient.street;
                      if (street.search("\n")) {
                          var splitter = street.split("\n");
                          pdf.addFdfValue("adresse1", splitter.shift());
                          pdf.addFdfValue("adresse2", splitter.join(" ; "));
                      } else {
                          pdf.addFdfValue("adresse1", patient.street);
                      }
                      pdf.addFdfValue("adresse3", patient.city + " " + patient.zipcode + " " + patient.state);

                      if (!isNssOwner.checked) {
                          var owner = freemedforms.forms.item("FrGroup::OwnerName");
                          if (!owner.isValid) {
                              print("NSS owner not available");
                              return;
                          }
                          pdf.addFdfValue("nom ben", owner.currentText);
                          //pdf.addFdfValue("prénom ben", nss.currentText);
                      }

                      print(nss.currentText);

                      if (nss.currentText.length == 15) {
                          pdf.addFdfValue("n° immatriculation", nss.currentText.substring(0, 13));
                          pdf.addFdfValue("clé immatric", nss.currentText.substring(13,15));
                      }

                      var user = freemedforms.user;
                      if (user.isValid) {
                          print("No valid user");
                          //return;
                      }

                      pdf.addFdfValue("num ident med1", user.identifiants.join("; "));
                      pdf.addFdfValue("nom medecin", user.usualName + " " + user.otherNames);
                      pdf.addFdfValue("prénom médecin", user.firstName);
                      pdf.addFdfValue("identif  medecin", user.fullAddress);

                      pdf.addFdfValue("date déclaration", freemedforms.tools.dateToString(new Date(), "ddMMyyyy"));

                      var filename = freemedforms.forms.extractFormFile("__subForms__/generic/fullidentity", "./pdf/fr/declaration.pdf");
                      pdf.endFdfEncoding(filename);

                      var output = freemedforms.tools.userDocumentPath + "declaration_" + patient.usualName + " " + patient.otherNames + " " + patient.firstName + ".pdf";
                      output = output.replace("  ", " ");
                      output = output.replace(" ", "_");
                      pdf.fillPdfWithFdf(filename, pdf.getFdfContent(), output, "ISO-8859-1");
                  }
                  _identity_france_declaration_med_traitant();
              </onclicked>
            </script>
          </Item>
        </Item>

        <Item type="detailswidget" name="ContactDetails" uifilename="./ui/xx/contact.ui">
          <uilink label="" widget="" layout="identityLayout"/>
          <label lang="xx">Contact</label>
          <label lang="fr">Contact</label>
          <column>1</column>
          <options>DontPrintEmptyValues;SummaryFontBold</options>

          <Item type="shorttext" name="ContactGroup::Tels">
            <uilink label="telsLabel" widget="telsEdit"/>
            <label lang="xx">Telephone numbers</label>
            <label lang="fr">Numéros de téléphone</label>
            <tooltip lang="xx">Semicolon separated list</tooltip>
            <tooltip lang="fr">Liste séparée par un point-virgule</tooltip>
            <options>DontPrintEmptyValues</options>
            <patientdata>Tels</patientdata>
          </Item>

          <Item type="shorttext" name="ContactGroup::MobileTel">
            <uilink label="mobileLabel" widget="mobileEdit"/>
            <label lang="xx">Mobile phone</label>
            <label lang="fr">Numéros de mobile</label>
            <tooltip lang="xx">Inform the mobile phone number</tooltip>
            <tooltip lang="fr">Renseignez le numéro de téléphone mobile</tooltip>
            <options>DontPrintEmptyValues</options>
            <patientdata>MobilePhone</patientdata>
          </Item>

          <Item type="shorttext" name="ContactGroup::Fax">
            <uilink label="faxLabel" widget="faxEdit"/>
            <label lang="xx">Fax number</label>
            <label lang="fr">Numéro de fax</label>
            <options>DontPrintEmptyValues</options>
            <patientdata>Faxes</patientdata>
          </Item>

          <Item type="shorttext" name="ContactGroup::Mail">
            <uilink label="emailLabel" widget="emailEdit"/>
            <label lang="xx">E-Mail</label>
            <label lang="fr">Courriel</label>
            <tooltip lang="xx">Semicolon separated list</tooltip>
            <tooltip lang="fr">Liste séparée par un point-virgule</tooltip>
            <options>DontPrintEmptyValues</options>
            <patientdata>Mails</patientdata>
          </Item>

          <Item type="button" name="ContactGroup::SendMailButton">
            <uilink widget="sendMailButton"/>
            <label lang="xx">Send mail</label>
            <label lang="fr">Envoyer un courriel</label>
            <icon>__theme__/mail_new.png</icon>
            <script>
              <onclicked>
              freemedforms.forms.namespaceInUse = "Subs::Tools::Identity::ContactGroup::";
              var address = freemedforms.forms.item("Mail");
              if (address.isValid) {
                  if (address.currentText != "")
                      freemedforms.tools.openUrl("mailto:" + address.currentText);
              }
              </onclicked>
            </script>
          </Item>

          <Item type="button" name="ContactGroup::SendSmsButton">
            <uilink widget="sendSmsButton"/>
            <label lang="xx">Send SMS</label>
            <label lang="fr">Envoyer un SMS</label>
            <icon>__theme__/iphone.png</icon>
          </Item>

        </Item>

        <Item type="detailswidget" name="ProfDetails" uifilename="./ui/xx/prof.ui">
            <uilink label="" widget="" layout="identityLayout"/>
            <label lang="xx">Profession</label>
            <label lang="fr">Profession</label>
            <column>1</column>
            <options>DontPrintEmptyValues;SummaryFontBold</options>

            <Item type="shorttext" name="ProfGroup::Profession">
              <uilink label="profLabel" widget="profEdit"/>
              <label lang="xx">Current profession</label>
              <label lang="fr">Profession actuelle</label>
              <options>DontPrintEmptyValues</options>
              <patientdata>Profession</patientdata>
            </Item>

            <Item type="shorttext" name="ProfGroup::ProfessionSite">
              <uilink label="profSiteLabel" widget="profSiteEdit"/>
              <label lang="xx">Site</label>
              <label lang="fr">Site</label>
              <options>DontPrintEmptyValues</options>
              <patientdata>ProfessionalSite</patientdata>
            </Item>

            <Item type="shorttext" name="ProfGroup::ProfessionTels">
              <uilink label="profTelsLabel" widget="profTelsEdit"/>
              <label lang="xx">Professional tel</label>
              <label lang="fr">Téléphone professionel</label>
              <options>DontPrintEmptyValues</options>
              <patientdata>ProfessionalTels</patientdata>
            </Item>

        </Item>
      </MedForm>

      <MedForm name="Subs::Tools::TrustedPerson" uifilename="./ui/xx/identity.ui">
        <label lang="xx">Trusted person</label>
        <label lang="fr">Personne de confiance</label>
        <options>unique;UseFormNameAsNameSpace;HideHeaderOnUniqueEpisode</options>
        <icon>__theme__/identity.png</icon>
        <file type="htmlprintmask">./html/xx/trustedperson_padtools_mask.html</file>
        <file type="htmlexportmask">./html/xx/trustedperson_padtools_mask.html</file>

        <Item type="detailswidget" name="TrustedPersonDetails" uifilename="./ui/xx/trusted.ui">
            <uilink label="" widget="" layout="identityLayout"/>
            <label lang="xx">Trusted person</label>
            <label lang="fr">Personne de confiance</label>
            <options>DontPrintEmptyValues;SummaryFontBold;expanded</options>

            <Item type="identity" name="Identity">
                <uilink label="" widget="" layout="trustedLayout"/>
                <label lang="xx">Full Identity</label>
                <label lang="fr">Identité</label>
                <options>with-address;xml</options>
                <file type="htmlprintmask">./html/xx/mask.html</file>
            </Item>

          <Item type="shorttext" name="Mail">
            <uilink label="mailLabel" widget="mail"/>
            <label lang="xx">E-Mail</label>
            <label lang="fr">Courriel</label>
            <tooltip lang="xx">Semicolon separated list</tooltip>
            <tooltip lang="fr">Liste séparée par un point-virgule</tooltip>
            <options>DontPrintEmptyValues</options>
          </Item>

          <Item type="button" name="SendMailButton">
            <uilink widget="trustedSendMail"/>
            <label lang="xx">Send mail</label>
            <label lang="fr">Envoyer un courriel</label>
            <icon>__theme__/mail_new.png</icon>
            <script>
              <onclicked>
              freemedforms.forms.namespaceInUse = "Subs::Tools::TrustedPerson::";
              var address = freemedforms.forms.item("Mail");
              if (address.isValid) {
                  if (address.currentText != "")
                      freemedforms.tools.openUrl("mailto:" + address.currentText);
              }
              </onclicked>
            </script>
          </Item>

          <Item type="shorttext" name="Tels">
            <uilink label="telLabel" widget="tel"/>
            <label lang="xx">Telephone numbers</label>
            <label lang="fr">Numéros de téléphone</label>
            <tooltip lang="xx">Semicolon separated list</tooltip>
            <tooltip lang="fr">Liste séparée par un point-virgule</tooltip>
            <options>DontPrintEmptyValues</options>
          </Item>

          <Item type="shorttext" name="MobileTel">
            <uilink label="mobileLabel" widget="mobile"/>
            <label lang="xx">Mobile phone</label>
            <label lang="fr">Numéros de mobile</label>
            <tooltip lang="xx">Inform the mobile phone number</tooltip>
            <tooltip lang="fr">Renseignez le numéro de téléphone mobile</tooltip>
            <options>DontPrintEmptyValues</options>
          </Item>

          <Item type="shorttext" name="Relation">
            <uilink label="relationLbl" widget="relation"/>
            <label lang="xx">Family relationships</label>
            <label lang="fr">Lien de parenté</label>
            <tooltip lang="xx">Relationship can be outside the family sphere</tooltip>
            <tooltip lang="fr">Les liens peuvent être extérieur à la famille</tooltip>
            <options>DontPrintEmptyValues</options>
          </Item>

        </Item>
      </MedForm>

  </MedForm>

  <file>__subForms__/generic/socio_demographics/central.xml</file>

</FreeMedForms>