Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AH | fix anc data reappear on second anc reg #25

Open
wants to merge 2 commits into
base: test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions opensrp-bidan/src/main/assets/dummy_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"events":[
{"_id": "742d755a-b66c-4d1a-a421-af614a95ca96", "obs": [{"values": ["1537AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "161010AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "select one", "formSubmissionField": "lokasiPeriksa", "humanReadableValues": ["Puskesmas"]}, {"values": ["160635AAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "160637AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "select one", "formSubmissionField": "pasienWilayah", "humanReadableValues": ["pasien_wilayah_desa"]}, {"values": ["1066AAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "160563AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "select one", "formSubmissionField": "pasienPindahan", "humanReadableValues": ["No"]}, {"values": ["Lekor"], "fieldCode": "Village", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "Village", "humanReadableValues": []}, {"values": ["Nusa Tenggara Barat"], "fieldCode": "Province", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "Province", "humanReadableValues": []}, {"values": ["Janapria"], "fieldCode": "Sub-district", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "Sub-district", "humanReadableValues": []}, {"values": ["Lombok Tengah"], "fieldCode": "District", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "District", "humanReadableValues": []}, {"values": ["Presak"], "fieldCode": "Sub-village", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "Sub-village", "humanReadableValues": []}, {"values": ["Janapria"], "fieldCode": "162724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "text", "formSubmissionField": "puskesmas", "humanReadableValues": []}, {"values": ["23"], "fieldCode": "1532AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "umur", "humanReadableValues": []}, {"values": ["Ibu rumah tangga"], "fieldCode": "1542AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "select one", "formSubmissionField": "pekerjaan", "humanReadableValues": []}, {"values": ["Presak"], "fieldCode": "162724AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "text", "formSubmissionField": "posyandu", "humanReadableValues": []}, {"values": ["163115AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "300AAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "select one", "formSubmissionField": "golonganDarah", "humanReadableValues": ["A"]}, {"values": ["0"], "fieldCode": "374AAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "hidden", "formSubmissionField": "jenisKontrasepsi", "humanReadableValues": []}, {"values": ["2018-09-24"], "fieldCode": "registrationDate", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "calculate", "formSubmissionField": "registrationDate", "humanReadableValues": []}], "_rev": "v1", "type": "Event", "version": 1537800886488, "duration": 0, "eventDate": "2018-09-23T16:00:00.000Z", "eventType": "Identitas Ibu", "entityType": "kartu_ibu", "locationId": "dafaa453-290c-4c52-9799-9fdb9222bf36", "providerId": "demo_user3", "dateCreated": "2018-09-24T14:56:34.571Z", "identifiers": {}, "baseEntityId": "328414fd-d364-4dcc-bca9-9104ad50d50b", "serverVersion": 1537800994571, "formSubmissionId": "454721d5-0e80-4d0b-8793-8f29e78abbd8"},
{"_id": "a2673050-1f57-421d-bab9-3684ddde1df3", "obs": [{"values": ["703AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "45AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "select one", "formSubmissionField": "pptest", "humanReadableValues": ["Positive"]}, {"values": ["Lekor"], "fieldCode": "cityVillage", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "cityVillage", "humanReadableValues": []}, {"values": ["Nusa Tenggara Barat"], "fieldCode": "Province", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "Province", "humanReadableValues": []}, {"values": ["Janapria"], "fieldCode": "Sub-district", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "Sub-district", "humanReadableValues": []}, {"values": ["Lombok Tengah"], "fieldCode": "District", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "District", "humanReadableValues": []}, {"values": ["Presak"], "fieldCode": "address1", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "address1", "humanReadableValues": []}, {"values": ["2018-01-03"], "fieldCode": "160753AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "date", "formSubmissionField": "referenceDate", "humanReadableValues": []}, {"values": ["2017-12-01"], "fieldCode": "1427AAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "date", "formSubmissionField": "tanggalHPHT", "humanReadableValues": []}, {"values": ["2018-9-7"], "fieldCode": "5596AAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "hidden", "formSubmissionField": "htp", "humanReadableValues": []}, {"values": ["43"], "fieldCode": "1438AAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "usiaKlinis", "humanReadableValues": []}, {"values": ["3"], "fieldCode": "160665AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "trimesterKe", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "134725AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskPregnancyProteinEnergyMalnutrition", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "162589AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskLabourTBRisk", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "163091AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "HighRiskPregnancyTooManyChildren", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "112791AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "HighRiskPregnancyAbortus", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "163155AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "HighRiskLabourSectionCesareaRecord", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "120237AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskEctopicPregnancy", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "119270AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskCardiovascularDiseaseRecord", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "6033AAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskDidneyDisorder", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "156637AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskHeartDisorder", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "121375AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskAsthma", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "1389AAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskTuberculosis", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "160152AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskMalaria", "humanReadableValues": []}, {"values": ["no"], "fieldCode": "163210AAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "fieldDataType": "calculate", "formSubmissionField": "highRiskHIVAIDS", "humanReadableValues": []}, {"values": ["anc"], "fieldCode": "type", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "hidden", "formSubmissionField": "type", "humanReadableValues": []}], "_rev": "v1", "type": "Event", "version": 1537811851939, "duration": 0, "eventDate": "2018-09-24T16:00:00.000Z", "eventType": "Tambah ANC", "entityType": "kartu_ibu", "locationId": "dafaa453-290c-4c52-9799-9fdb9222bf36", "providerId": "demo_user3", "dateCreated": "2018-09-24T17:57:34.431Z", "identifiers": {}, "baseEntityId": "328414fd-d364-4dcc-bca9-9104ad50d50b", "serverVersion": 1537811854430, "formSubmissionId": "ae8924da-0d1f-403a-8b09-da9c34de61ce"}
],
"clients":[
{"_id": "58a7b640-02d9-447e-9f84-dc7469a4dd28", "_rev": "v10", "type": "Client", "gender": "female", "lastName": "Ayah satu edit", "addresses": [{"addressType": "usual_residence", "cityVillage": "Lekor", "addressFields": {"address1": "Presak", "address2": "Janapria"}, "stateProvince": "Nusa Tenggara Barat", "countyDistrict": "Lombok Tengah"}], "birthdate": "1987-09-26T16:00:00.000Z", "firstName": "Ibu satu edit", "attributes": {}, "dateEdited": "2018-09-26T07:46:28.728Z", "dateCreated": "2018-09-24T15:54:59.106Z", "identifiers": {"OPENMRS_UUID": "9dddb334-2cb8-4b2c-967a-de96bf1cfb24"}, "baseEntityId": "328414fd-d364-4dcc-bca9-9104ad50d50b", "relationships": {"childId": ["20872132-0178-40ed-8eec-27721f2e46c0", "03a54688-633b-4148-84bd-0ab832dd5970"]}, "serverVersion": 1538439354686, "birthdateApprox": false, "deathdateApprox": false}
]
}
1 change: 1 addition & 0 deletions opensrp-bidan/src/main/assets/dummy_loc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"locations":{"locationsHierarchy":{"map":{"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41":{"id":"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41","label":"Madagascar Demo","node":{"locationId":"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41","name":"Madagascar Demo","tags":["Country"],"voided":false},"children":{"25c47d25-4a71-4879-8ba2-cc1e0b9f616b":{"id":"25c47d25-4a71-4879-8ba2-cc1e0b9f616b","label":"Analanjirofo Demo","node":{"locationId":"25c47d25-4a71-4879-8ba2-cc1e0b9f616b","name":"Analanjirofo Demo","parentLocation":{"locationId":"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41","name":"Madagascar Demo","voided":false},"tags":["Province"],"voided":false},"children":{"1c29b0fd-2dae-4b8b-943d-8b691c051e43":{"id":"1c29b0fd-2dae-4b8b-943d-8b691c051e43","label":"Maroantsetra Demo","node":{"locationId":"1c29b0fd-2dae-4b8b-943d-8b691c051e43","name":"Maroantsetra Demo","parentLocation":{"locationId":"25c47d25-4a71-4879-8ba2-cc1e0b9f616b","name":"Analanjirofo Demo","parentLocation":{"locationId":"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41","name":"Madagascar Demo","voided":false},"voided":false},"tags":["District"],"voided":false},"children":{"4caf82da-899a-4fce-8cf6-d111dcb75f3e":{"id":"4caf82da-899a-4fce-8cf6-d111dcb75f3e","label":"Antsirabe-Sahatany Demo","node":{"locationId":"4caf82da-899a-4fce-8cf6-d111dcb75f3e","name":"Antsirabe-Sahatany Demo","parentLocation":{"locationId":"1c29b0fd-2dae-4b8b-943d-8b691c051e43","name":"Maroantsetra Demo","parentLocation":{"locationId":"25c47d25-4a71-4879-8ba2-cc1e0b9f616b","name":"Analanjirofo Demo","voided":false},"voided":false},"tags":["Sub-district"],"voided":false},"children":{"cb9f78cc-1dc5-49e0-978f-2ec852af7104":{"id":"cb9f78cc-1dc5-49e0-978f-2ec852af7104","label":"Antaravato Demo","node":{"locationId":"cb9f78cc-1dc5-49e0-978f-2ec852af7104","name":"Antaravato Demo","parentLocation":{"locationId":"4caf82da-899a-4fce-8cf6-d111dcb75f3e","name":"Antsirabe-Sahatany Demo","parentLocation":{"locationId":"1c29b0fd-2dae-4b8b-943d-8b691c051e43","name":"Maroantsetra Demo","voided":false},"voided":false},"tags":["Village"],"voided":false},"children":{"9a1425b1-02b9-4f8d-b26e-39e7bb8bdeac":{"id":"9a1425b1-02b9-4f8d-b26e-39e7bb8bdeac","label":"Nama Dusun","node":{"locationId":"9a1425b1-02b9-4f8d-b26e-39e7bb8bdeac","name":"Nama Dusun","parentLocation":{"locationId":"cb9f78cc-1dc5-49e0-978f-2ec852af7104","name":"Antaravato Demo","parentLocation":{"locationId":"4caf82da-899a-4fce-8cf6-d111dcb75f3e","name":"Antsirabe-Sahatany Demo","voided":false},"voided":false},"tags":["Sub-village"],"voided":false},"parent":"cb9f78cc-1dc5-49e0-978f-2ec852af7104"}},"parent":"4caf82da-899a-4fce-8cf6-d111dcb75f3e"}},"parent":"1c29b0fd-2dae-4b8b-943d-8b691c051e43"}},"parent":"25c47d25-4a71-4879-8ba2-cc1e0b9f616b"}},"parent":"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41"}}}},"parentChildren":{"cb9f78cc-1dc5-49e0-978f-2ec852af7104":["9a1425b1-02b9-4f8d-b26e-39e7bb8bdeac"],"4caf82da-899a-4fce-8cf6-d111dcb75f3e":["cb9f78cc-1dc5-49e0-978f-2ec852af7104"],"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41":["25c47d25-4a71-4879-8ba2-cc1e0b9f616b"],"25c47d25-4a71-4879-8ba2-cc1e0b9f616b":["1c29b0fd-2dae-4b8b-943d-8b691c051e43"],"1c29b0fd-2dae-4b8b-943d-8b691c051e43":["4caf82da-899a-4fce-8cf6-d111dcb75f3e"]}}},"team":{"person":{"birthdateEstimated":false,"preferredName":{"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/person/194f471f-4a4e-4be4-8178-3c0d5af3f38f/name/0eef54c0-5ef2-442e-ae13-1706cba012ef"}],"display":"demo_user3 Demo","uuid":"0eef54c0-5ef2-442e-ae13-1706cba012ef"},"deathdateEstimated":false,"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/person/194f471f-4a4e-4be4-8178-3c0d5af3f38f"},{"rel":"full","uri":"NEED-TO-CONFIGURE/ws/rest/v1/person/194f471f-4a4e-4be4-8178-3c0d5af3f38f?v\u003dfull"}],"display":"demo_user3 Demo","resourceVersion":"1.11","voided":false,"gender":"M","uuid":"194f471f-4a4e-4be4-8178-3c0d5af3f38f","attributes":[],"dead":false},"teamMemberId":15.0,"location":[{"tags":[{"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/locationtag/49dc7f82-9dd2-45d2-bcf9-830c0599658f"}],"display":"Village","uuid":"49dc7f82-9dd2-45d2-bcf9-830c0599658f"}],"retired":false,"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/location/cb9f78cc-1dc5-49e0-978f-2ec852af7104"},{"rel":"full","uri":"NEED-TO-CONFIGURE/ws/rest/v1/location/cb9f78cc-1dc5-49e0-978f-2ec852af7104?v\u003dfull"}],"display":"Antaravato Demo","parentLocation":{"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/location/4caf82da-899a-4fce-8cf6-d111dcb75f3e"}],"display":"Antsirabe-Sahatany Demo","uuid":"4caf82da-899a-4fce-8cf6-d111dcb75f3e"},"resourceVersion":"1.9","childLocations":[{"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/location/9a1425b1-02b9-4f8d-b26e-39e7bb8bdeac"}],"display":"Nama Dusun","uuid":"9a1425b1-02b9-4f8d-b26e-39e7bb8bdeac"}],"description":"Antaravato Demo","name":"Antaravato Demo","attributes":[],"uuid":"cb9f78cc-1dc5-49e0-978f-2ec852af7104"}],"resourceVersion":"1.8","isTeamLead":false,"uuid":"a18ef57d-c16d-4ae3-af41-c14d5b01865c","team":{"teamName":"Madagascar-Demo","teamIdentifier":"madagascar_demo","location":{"tags":[{"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/locationtag/9ab943d7-efc5-4583-8fd7-d645e48ec538"}],"display":"Country","uuid":"9ab943d7-efc5-4583-8fd7-d645e48ec538"}],"retired":false,"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/location/9a46eb20-c484-4ed1-bc15-9c79c5a4ec41"},{"rel":"full","uri":"NEED-TO-CONFIGURE/ws/rest/v1/location/9a46eb20-c484-4ed1-bc15-9c79c5a4ec41?v\u003dfull"}],"display":"Madagascar Demo","resourceVersion":"1.9","childLocations":[{"links":[{"rel":"self","uri":"NEED-TO-CONFIGURE/ws/rest/v1/location/25c47d25-4a71-4879-8ba2-cc1e0b9f616b"}],"display":"Analanjirofo Demo","uuid":"25c47d25-4a71-4879-8ba2-cc1e0b9f616b"}],"description":"Madagascar Demo","name":"Madagascar Demo","attributes":[],"uuid":"9a46eb20-c484-4ed1-bc15-9c79c5a4ec41"},"resourceVersion":"1.8","dateCreated":"2017-09-01T11:27:00.000+0000","display":"Madagascar-Demo","uuid":"02213dfd-6b3b-47dc-a435-1f6f0a99bb67"},"identifier":"demo_user3"},"user":{"username":"demo_user3","status":"demo_user3 Demo","roles":["Provider","Authenticated"],"permissions":["View Relationships","Patient Overview - View Relationships","View Identifier Types","View Roles","View Concept Datatypes","View Person Attribute Types","View Global Properties","Get Identifier Types","View Concept Classes","Get Concept Classes","Get Concept Datatypes","Get Privileges","Get Roles","Get Field Types","Get Order Types","View Relationship Types","Get Relationship Types","View Privileges","View Order Types","View Encounter Types","View Field Types","Get Person Attribute Types","Get Global Properties","Get Encounter Types","Get Locations","View Locations","Get Relationships"],"preferredName":"demo_user3 Demo","baseEntityId":"eca42468-a197-44b3-b469-9d30cfc0fb8d","attributes":{"_PERSON_UUID":"194f471f-4a4e-4be4-8178-3c0d5af3f38f"},"voided":false}}
8 changes: 8 additions & 0 deletions opensrp-bidan/src/main/assets/ec_client_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@
"field": "obs.fieldCode",
"concept": "1576AAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
},
{
"column_name": "childId",
"type": "Event",
"json_mapping": {
"field": "obs.fieldCode",
"concept": "1576AAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
}
]
},
Expand Down
Loading