toulouse-maelis: manage new fields on medical record (#71642)
This commit is contained in:
parent
f76b14b411
commit
ae047130d8
|
@ -342,6 +342,38 @@ MEDICALRECORD_SCHEMA = {
|
||||||
'type': 'object',
|
'type': 'object',
|
||||||
'properties': {
|
'properties': {
|
||||||
'familyDoctor': FAMILYDOCTOR_SCHEMA,
|
'familyDoctor': FAMILYDOCTOR_SCHEMA,
|
||||||
|
'allergy1': {
|
||||||
|
'description': 'Allergie 1',
|
||||||
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
||||||
|
},
|
||||||
|
'allergy2': {
|
||||||
|
'description': 'Allergie 2',
|
||||||
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
||||||
|
},
|
||||||
|
'comment1': {
|
||||||
|
'description': 'Commentaire 1',
|
||||||
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
||||||
|
},
|
||||||
|
'comment2': {
|
||||||
|
'description': 'Commentaire 2',
|
||||||
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
||||||
|
},
|
||||||
|
'observ1': {
|
||||||
|
'description': 'Observation 1',
|
||||||
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
||||||
|
},
|
||||||
|
'observ2': {
|
||||||
|
'description': 'Observation 2',
|
||||||
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
||||||
|
},
|
||||||
|
'isAuthHospital': {
|
||||||
|
'description': "Autorisation d'hospitalisation",
|
||||||
|
'oneOf': BOOLEAN_TYPES,
|
||||||
|
},
|
||||||
|
'hospital': {
|
||||||
|
'description': 'Hopital',
|
||||||
|
'oneOf': [{'type': 'string'}, {'type': 'null'}],
|
||||||
|
},
|
||||||
'vaccinList': {
|
'vaccinList': {
|
||||||
'oneOf': [
|
'oneOf': [
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
<town>Compton</town>
|
<town>Compton</town>
|
||||||
</address>
|
</address>
|
||||||
</familyDoctor>
|
</familyDoctor>
|
||||||
|
<allergy1>butterscotch, imitation butterscotch, glow-in-the-dark monster make-up, and shrimp</allergy1>
|
||||||
|
<allergy2>cauliflower</allergy2>
|
||||||
|
<comment1>the shrimp allergy isn't fully identified</comment1>
|
||||||
|
<comment2/>
|
||||||
|
<observ1>Ay Caramba!</observ1>
|
||||||
|
<observ2/>
|
||||||
|
<isAuthHospital>true</isAuthHospital>
|
||||||
|
<hospital>Springfield General Hospital</hospital>
|
||||||
<vaccinList>
|
<vaccinList>
|
||||||
<code>DTC</code>
|
<code>DTC</code>
|
||||||
<vaccinationDate>2011-01-11</vaccinationDate>
|
<vaccinationDate>2011-01-11</vaccinationDate>
|
||||||
|
|
|
@ -130,6 +130,13 @@
|
||||||
<town>Compton</town>
|
<town>Compton</town>
|
||||||
</address>
|
</address>
|
||||||
</familyDoctor>
|
</familyDoctor>
|
||||||
|
<allergy1>butterscotch, imitation butterscotch, glow-in-the-dark monster make-up</allergy1>
|
||||||
|
<allergy2>shrimp and cauliflower</allergy2>
|
||||||
|
<comment1>the shrimp allergy isn't fully identified</comment1>
|
||||||
|
<observ1>Ay Caramba!</observ1>
|
||||||
|
<observ2>Eat my shorts!</observ2>
|
||||||
|
<isAuthHospital>true</isAuthHospital>
|
||||||
|
<hospital>Springfield General Hospital</hospital>
|
||||||
<vaccinList>
|
<vaccinList>
|
||||||
<code>ROR</code>
|
<code>ROR</code>
|
||||||
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
|
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
|
||||||
|
|
|
@ -128,6 +128,13 @@
|
||||||
<town>Compton</town>
|
<town>Compton</town>
|
||||||
</address>
|
</address>
|
||||||
</familyDoctor>
|
</familyDoctor>
|
||||||
|
<allergy1>butterscotch, imitation butterscotch, glow-in-the-dark monster make-up</allergy1>
|
||||||
|
<allergy2>shrimp and cauliflower</allergy2>
|
||||||
|
<comment1>the shrimp allergy isn't fully identified</comment1>
|
||||||
|
<observ1>Ay Caramba!</observ1>
|
||||||
|
<observ2>Eat my shorts!</observ2>
|
||||||
|
<isAuthHospital>true</isAuthHospital>
|
||||||
|
<hospital>Springfield General Hospital</hospital>
|
||||||
<vaccinList>
|
<vaccinList>
|
||||||
<code>ROR</code>
|
<code>ROR</code>
|
||||||
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
|
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
|
||||||
|
|
|
@ -129,6 +129,13 @@
|
||||||
<town>Compton</town>
|
<town>Compton</town>
|
||||||
</address>
|
</address>
|
||||||
</familyDoctor>
|
</familyDoctor>
|
||||||
|
<allergy1>butterscotch, imitation butterscotch, glow-in-the-dark monster make-up</allergy1>
|
||||||
|
<allergy2>shrimp and cauliflower</allergy2>
|
||||||
|
<comment1>the shrimp allergy isn't fully identified</comment1>
|
||||||
|
<observ1>Ay Caramba!</observ1>
|
||||||
|
<observ2>Eat my shorts!</observ2>
|
||||||
|
<isAuthHospital>true</isAuthHospital>
|
||||||
|
<hospital>Springfield General Hospital</hospital>
|
||||||
<vaccinList>
|
<vaccinList>
|
||||||
<code>ROR</code>
|
<code>ROR</code>
|
||||||
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
|
<label>ROUGEOLE-OREILLONS-RUBEOLE</label>
|
||||||
|
|
|
@ -666,14 +666,14 @@ def test_read_family(mocked_post, mocked_get, read_family, con, app):
|
||||||
"phone": "0612341234",
|
"phone": "0612341234",
|
||||||
"address": {"street1": "Alameda", "zipcode": "90220", "town": "Compton"},
|
"address": {"street1": "Alameda", "zipcode": "90220", "town": "Compton"},
|
||||||
},
|
},
|
||||||
'allergy1': None,
|
'allergy1': 'butterscotch, imitation butterscotch, glow-in-the-dark monster make-up',
|
||||||
'allergy2': None,
|
'allergy2': 'shrimp and cauliflower',
|
||||||
'comment1': None,
|
'comment1': "the shrimp allergy isn't fully identified",
|
||||||
'comment2': None,
|
'comment2': None,
|
||||||
'hospital': None,
|
'observ1': 'Ay Caramba!',
|
||||||
'isAuthHospital': None,
|
'observ2': 'Eat my shorts!',
|
||||||
'observ1': None,
|
'isAuthHospital': True,
|
||||||
'observ2': None,
|
'hospital': 'Springfield General Hospital',
|
||||||
"vaccinList": [
|
"vaccinList": [
|
||||||
{
|
{
|
||||||
"code": "ROR",
|
"code": "ROR",
|
||||||
|
@ -2701,6 +2701,14 @@ def test_update_child_medical_record(mocked_post, mocked_get, con, app):
|
||||||
'familyDoctor/address/street1': 'Alameda',
|
'familyDoctor/address/street1': 'Alameda',
|
||||||
'familyDoctor/address/zipcode': '90220',
|
'familyDoctor/address/zipcode': '90220',
|
||||||
'familyDoctor/address/town': 'Compton',
|
'familyDoctor/address/town': 'Compton',
|
||||||
|
'allergy1': 'butterscotch, imitation butterscotch, glow-in-the-dark monster make-up, and shrimp',
|
||||||
|
'allergy2': 'cauliflower',
|
||||||
|
'comment1': "the shrimp allergy isn't fully identified",
|
||||||
|
'comment2': None,
|
||||||
|
'observ1': 'Ay Caramba!',
|
||||||
|
'observ2': None,
|
||||||
|
'isAuthHospital': True,
|
||||||
|
'hospital': 'Springfield General Hospital',
|
||||||
'vaccinList/0/code': 'DTC',
|
'vaccinList/0/code': 'DTC',
|
||||||
'vaccinList/0/vaccinationDate': '2011-01-11',
|
'vaccinList/0/vaccinationDate': '2011-01-11',
|
||||||
'vaccinList/1/code': 'ROR',
|
'vaccinList/1/code': 'ROR',
|
||||||
|
|
Loading…
Reference in New Issue