primary_care_admin_binder 0.1.139 → 0.1.140

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.cjs.js +123 -192
  2. package/package.json +2 -1
package/dist/index.cjs.js CHANGED
@@ -8450,9 +8450,11 @@ var queries$o = {
8450
8450
  practitioner_by_id: function practitioner_by_id(id) {
8451
8451
  return {
8452
8452
  db_name: dbName,
8453
- entity: "Practitioner",
8454
- filter: "Practitioner._key=='".concat(id, "' && Practitioner.activestatus==true"),
8455
- return_fields: "merge(adqolcPractitioner,{identifier:(FOR iden IN DOCUMENT(adqolcPractitioner.personid).identifier RETURN MERGE(iden,{code:KEEP(DOCUMENT(iden.code),'_id','display'),use:KEEP(DOCUMENT(iden.use),'_id','display'),attachments:(for att in iden.attachments FILTER document(att).activestatus == true RETURN KEEP(document(att),'url','fileName','fileid','objectid','filetype','_id'))})),address:(FOR addr IN document(adqolcPractitioner.personid).address RETURN MERGE(addr,{use:KEEP(DOCUMENT(addr.use),'_id','display'),type:KEEP(DOCUMENT(addr.type),'_id','display'),city:KEEP(DOCUMENT(addr.city),'_id','geogLevelName'),district:KEEP(DOCUMENT(addr.district),'_id','geogLevelName'),state:KEEP(DOCUMENT(addr.state),'_id','geogLevelName'),postalcode:KEEP(DOCUMENT(addr.postalcode),'_id','geogLevelName'),country:KEEP(DOCUMENT(addr.country),'_id','geogLevelName')})),communication:(FOR coms IN DOCUMENT(adqolcPractitioner.personid).communicationlanguage RETURN KEEP(DOCUMENT(coms),'_id','display')),marital_status:KEEP(DOCUMENT(DOCUMENT(adqolcPractitioner.personid).maritalstatus),'_id','display'),birthdate:DOCUMENT(adqolcPractitioner.personid).birthdate,name:(FOR name IN DOCUMENT(adqolcPractitioner.personid).name RETURN MERGE(name,{use:KEEP(DOCUMENT(name.use),'_id','display'),prefix:KEEP(DOCUMENT(name.prefix),'_id','display')})),nationality:KEEP(DOCUMENT(DOCUMENT(adqolcPractitioner.personid).nationality),'_id','geogLevelName'),practitioner_type:KEEP(DOCUMENT(adqolcPractitioner.practitioner_type),'_id','display'),gender:KEEP(DOCUMENT(DOCUMENT(adqolcPractitioner.personid).gender),'_id','display'),practitioner_role:(FOR pro IN adqolcPractitioner.practitioner_role RETURN MERGE(pro,{role:KEEP(DOCUMENT(pro.role),'_id','display'),specialtyid:KEEP(DOCUMENT(pro.specialtyid),'_id','display'),entitytype:KEEP(DOCUMENT(pro.entitytype),'_id','display'),entityname:DOCUMENT(pro.entityname),locationid:dOCUMENT(pro.locationid)})),telecom:(FOR tel IN DOCUMENT(adqolcPractitioner.personid).telecom RETURN MERGE(tel,{system:KEEP(DOCUMENT(tel.system),'_id','display'),use:KEEP(DOCUMENT(tel.use),'_id','display')})),photo:DOCUMENT(DOCUMENT(adqolcPractitioner.personid).photo)})"
8453
+ queryid: "4daba280-4b41-40a5-94bc-75b2ae38e8db",
8454
+ filter: {
8455
+ key: "".concat(id),
8456
+ activestatus: true
8457
+ }
8456
8458
  };
8457
8459
  },
8458
8460
  practitioner_list: function practitioner_list() {
@@ -8461,14 +8463,12 @@ var queries$o = {
8461
8463
  var search = arguments.length > 2 ? arguments[2] : undefined;
8462
8464
  return {
8463
8465
  db_name: dbName,
8464
- entity: "Practitioner",
8465
- sort: "adqolcPractitioner .createddate desc",
8466
- filter: "(like(FIRST(DOCUMENT(adqolcPractitioner .personid).name[*].fulname),'%".concat(search, "%',true) || like(DOCUMENT(adqolcPractitioner .practitioner_type).display,'%").concat(search, "%',true) || like(document(document(document(adqolcPractitioner .practitioner_role[0]).specialtyid).coding[0]).display,'%").concat(search, "%',true)|| LIKE(document(adqolcPractitioner .practitioner_role[0].specialtyid).display,'%").concat(search, "%',TRUE)) && adqolcPractitioner .activestatus==true"),
8467
- limit: {
8468
- "offset": page,
8469
- "count": perPage
8470
- },
8471
- return_fields: "{TotalCount:count(FOR prt IN Practitioner FILTER (like(FIRST(DOCUMENT(prt.personid).name[*].fulname),'%%',true) || like(DOCUMENT(prt.practitioner_type).display,'%%',true) || like(document(document(document(prt.practitioner_role[0]).specialtyid).coding[0]).display,'%%',true)|| LIKE(document(prt.practitioner_role[0].specialtyid).display,'%%',TRUE)) && prt.activestatus==true return prt._id),id:adqolcPractitioner ._id,name:CONCAT(FIRST(DOCUMENT(DOCUMENT(adqolcPractitioner .personid).name[*].prefix)[*].display),' ',FIRST(DOCUMENT(adqolcPractitioner .personid).name[*].fulname)),type:DOCUMENT(adqolcPractitioner .practitioner_type).display,_key:adqolcPractitioner ._key,status:adqolcPractitioner.active,Practitionerrole:(FOR rle IN adqolcPractitioner .practitioner_role RETURN MERGE(rle,{role:KEEP(DOCUMENT(rle.role),'_id','display'),specialtyid:KEEP(DOCUMENt(rle.specialtyid),'_id','display')}))}"
8466
+ queryid: "b1b6a289-71c1-449a-be57-c6b7cddff699",
8467
+ filter: {
8468
+ search: "".concat(search),
8469
+ offset: page,
8470
+ count: perPage
8471
+ }
8472
8472
  };
8473
8473
  },
8474
8474
  status_update_practitioner: function status_update_practitioner(data) {
@@ -8488,11 +8488,12 @@ var queries$o = {
8488
8488
  },
8489
8489
  get_entity_by_id: function get_entity_by_id(id) {
8490
8490
  return {
8491
- "db_name": dbName,
8492
- "entity": "Organization",
8493
- "sort": "Organization.name",
8494
- "filter": "Organization.activestatus==true && Organization.OrgType any =='".concat(id, "'"),
8495
- "return_fields": "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
8491
+ db_name: dbName,
8492
+ queryid: "3265e287-5a0e-482d-a2e9-d6ee96e83c9a",
8493
+ filter: {
8494
+ activestatus: true,
8495
+ orgType: "".concat(id)
8496
+ }
8496
8497
  };
8497
8498
  }
8498
8499
  };
@@ -8611,11 +8612,11 @@ var PRACTITIONER_LIST_READ = createAsyncThunk("practitionerSlice/practitioner",
8611
8612
  _context3.n = 2;
8612
8613
  return fetchData({
8613
8614
  body: JSON.stringify(queries$o.practitioner_list(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
8614
- }, __readDocumentUrl__);
8615
+ }, __baseUrl__$1);
8615
8616
  case 2:
8616
8617
  data = _context3.v;
8617
8618
  arry = [];
8618
- data.result.map(function (val) {
8619
+ data.map(function (val) {
8619
8620
  var _val$Practitionerrole;
8620
8621
  // if(val.name){
8621
8622
  arry.push({
@@ -8730,11 +8731,11 @@ var GET_ENTITY_BY_ID = createAsyncThunk("practitionerSlice/get_entity_id", /*#__
8730
8731
  _context6.n = 2;
8731
8732
  return fetchData({
8732
8733
  body: JSON.stringify(queries$o.get_entity_by_id(id))
8733
- }, __readDocumentUrl__);
8734
+ }, __baseUrl__$1);
8734
8735
  case 2:
8735
8736
  data = _context6.v;
8736
8737
  arry = [];
8737
- data.result.map(function (value) {
8738
+ data.map(function (value) {
8738
8739
  var _value$name, _value$_id;
8739
8740
  arry.push(_objectSpread2({
8740
8741
  label: (_value$name = value === null || value === void 0 ? void 0 : value.name) !== null && _value$name !== void 0 ? _value$name : "",
@@ -8811,150 +8812,88 @@ var practitionerActions$1 = {
8811
8812
  };
8812
8813
  var practitionerSlice$1 = practitionerSlice.reducer;
8813
8814
 
8815
+ var codingMasterFilter = function codingMasterFilter(type) {
8816
+ return {
8817
+ db_name: _dbName,
8818
+ queryid: "95931016-caf1-413c-8bf5-96f05c5709fb",
8819
+ filter: {
8820
+ type: type,
8821
+ status: true,
8822
+ activestatus: true
8823
+ }
8824
+ };
8825
+ };
8814
8826
  var masterQuery$7 = {
8815
- "id_type": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='ALTERNATEIDTYPE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8816
- "id_number": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='RELATIONSHIP' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8817
- "prefix": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='NAMEPREFIX' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8818
- "suffix": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='NAMESUFFIX' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8819
- "gender": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='GENDER' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8820
- "use": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='USE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8821
- "practitioner_type": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='PRACTTYPE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8822
- "Communication_languages": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='LANGUAGE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8823
- "speciality": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='SPECIALTY' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8824
- // "entity": `{
8825
- // "db_name": "${_dbName}",
8826
- // "entity": "Organization",
8827
- // "filter": "Organization.OrgType!=[]",
8828
- // "return_fields": "DISTINCT Organization.OrgType[0]"
8829
- // }`,
8830
- "entity": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='ORGTYPE' && CodingMaster.status==true && CodingMaster.activestatus==true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8831
- // "entity_name": `{
8832
- // "db_name": "${_dbName}",
8833
- // "entity": "Organization",
8834
- // "filter": "'Hospital' IN Organization.OrgType",
8835
- // "return_fields": "{OrgID:Organization.id,name:Organization.name}"
8836
- // }`,
8837
- "entity_name": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"Organization\",\n \"filter\": \"Organization.activestatus==true\",\n \"return_fields\": \"{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}\"\n }"),
8838
- "Address_use": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='USE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8839
- "contact_mode": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='CONTACTSYSTEM' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8840
- "priority": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='PRIORITY' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8841
- "address_type": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='ADDRESSTYPE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8842
- "role": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='PRACTROLE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8843
- "location": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"LocationMaster\",\n \"sort\":\"LocationMaster.shortdesc\",\n \"filter\": \"LocationMaster.activestatus==true && lower(LocationMaster.status)=='active' && LocationMaster.parentLocationID_desc == '' && LocationMaster.locationType != null\", \n \"return_fields\": \"LocationMaster\"\n }"),
8844
- // "city": `{
8845
- // "db_name": "${_dbName}",
8846
- // "entity": "SMGeographicMaster",
8847
- // "sort":"SMGeographicMaster.geogLevelName",
8848
- // "filter": "SMGeographicMaster.geogLevelType=='CITY' && SMGeographicMaster.activestatus == true",
8849
- // "return_fields": "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
8850
- // }`,
8851
- // "district": `{
8852
- // "db_name": "${_dbName}",
8853
- // "entity": "SMGeographicMaster",
8854
- // "sort":"SMGeographicMaster.geogLevelName",
8855
- // "filter": "SMGeographicMaster.geogLevelType=='DISTRICT' && SMGeographicMaster.geogLevelCode=='BLR' && SMGeographicMaster.activestatus == true",
8856
- // "return_fields": "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
8857
- // }`,
8858
- // "state": `{
8859
- // "db_name": "${_dbName}",
8860
- // "entity": "SMGeographicMaster",
8861
- // "sort":"SMGeographicMaster.geogLevelName",
8862
- // "filter": "SMGeographicMaster.geogLevelType=='STATE' && SMGeographicMaster.geogLevelCode=='KAR' && SMGeographicMaster.activestatus == true",
8863
- // "return_fields": "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
8864
- // }`,
8865
- // "country": `{
8866
- // "db_name": "${_dbName}",
8867
- // "entity": "SMGeographicMaster",
8868
- // "sort":"SMGeographicMaster.geogLevelName",
8869
- // "filter": "SMGeographicMaster.geogLevelType=='COUNTRY' && SMGeographicMaster.activestatus == true",
8870
- // "return_fields": "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
8871
- // }`,
8872
- // "country": `{
8873
- // "db_name": "primarycare",
8874
- // "entity": "SMGeographicMaster",
8875
- // "sort": "SMGeographicMaster.geogLevelName",
8876
- // "filter": "document(SMGeographicMaster.geogLevelType).code=='GE002' && SMGeographicMaster.activestatus == true",
8877
- // "return_fields": "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,geogLevelCode:SMGeographicMaster.geogLevelCode,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
8878
- // }`,
8879
- "position": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='POSITION' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8880
- "employee_type": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='EMPSTATUS' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8881
- "marital_status": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='MARITALSTATUS' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
8882
- "nationality": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"SMGeographicMaster\",\n \"sort\": \"SMGeographicMaster.geogLevelName\",\n \"filter\": \"lower(document(SMGeographicMaster.geogLevelType).display)=='country' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active== true\",\n \"return_fields\": \"{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}\"\n }"),
8883
- "country_code": "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"SMGeographicMaster\",\n \"sort\": \"SMGeographicMaster.GeoLocationISDCode\",\n \"filter\": \"lower(document(SMGeographicMaster.geogLevelType).display)=='country' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true\",\n \"return_fields\": \"{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode,GeoLocationISDCode:SMGeographicMaster.GeoLocationISDCode}\"\n }")
8827
+ id_type: JSON.stringify(codingMasterFilter("ALTERNATEIDTYPE")),
8828
+ id_number: JSON.stringify(codingMasterFilter("RELATIONSHIP")),
8829
+ prefix: JSON.stringify(codingMasterFilter("NAMEPREFIX")),
8830
+ suffix: JSON.stringify(codingMasterFilter("NAMESUFFIX")),
8831
+ gender: JSON.stringify(codingMasterFilter("GENDER")),
8832
+ use: JSON.stringify(codingMasterFilter("USE")),
8833
+ practitioner_type: JSON.stringify(codingMasterFilter("PRACTTYPE")),
8834
+ Communication_languages: JSON.stringify(codingMasterFilter("LANGUAGE")),
8835
+ speciality: JSON.stringify(codingMasterFilter("SPECIALTY")),
8836
+ entity: JSON.stringify(codingMasterFilter("ORGTYPE")),
8837
+ Address_use: JSON.stringify(codingMasterFilter("USE")),
8838
+ contact_mode: JSON.stringify(codingMasterFilter("CONTACTSYSTEM")),
8839
+ priority: JSON.stringify(codingMasterFilter("PRIORITY")),
8840
+ address_type: JSON.stringify(codingMasterFilter("ADDRESSTYPE")),
8841
+ role: JSON.stringify(codingMasterFilter("PRACTROLE")),
8842
+ position: JSON.stringify(codingMasterFilter("POSITION")),
8843
+ employee_type: JSON.stringify(codingMasterFilter("EMPSTATUS")),
8844
+ marital_status: JSON.stringify(codingMasterFilter("MARITALSTATUS")),
8845
+ entity_name: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"queryid\": \"9f065c19-10c9-41e1-b925-53458964974f\", \n \"filter\": {\n \"activestatus\": true\n }\n }"),
8846
+ location: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"queryid\": \"c27d71be-6c29-4024-aab3-1dd0a0a88c32\", \n \"filter\": {\n \"activestatus\": true, \n \"status\": \"active\", \n \"parentLocationId\": \"\",\n \"locationtype\": null,\n \"organizationId\": null\n }\n }"),
8847
+ nationality: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"queryid\": \"d3659637-f0aa-4e0d-86d6-61fd445f7dd5\",\n \"filter\":{\n \"display\": \"country\",\n \"activestatus\": true,\n \"active\": true,\n \"sort\":\"geogLevelName\"\n }\n }"),
8848
+ country_code: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"queryid\": \"d3659637-f0aa-4e0d-86d6-61fd445f7dd5\",\n \"filter\":{\n \"display\": \"country\",\n \"activestatus\": true,\n \"active\": true,\n \"sort\":\"GeoLocationISDCode\"\n }\n }")
8849
+ };
8850
+ var geoQuery = function geoQuery(display, geogLevelCode) {
8851
+ return {
8852
+ db_name: _dbName,
8853
+ queryid: "ad647bcf-edcc-44ac-9ca9-67c3b277b8df",
8854
+ filter: _objectSpread2({
8855
+ activestatus: true,
8856
+ display: display
8857
+ }, geogLevelCode ? {
8858
+ geoglevelcode: geogLevelCode
8859
+ } : {})
8860
+ };
8884
8861
  };
8885
8862
  var masterqueries = {
8886
8863
  country: function country() {
8887
8864
  return {
8888
- "db_name": _dbName,
8889
- "entity": "SMGeographicMaster",
8890
- "sort": "SMGeographicMaster.geogLevelName",
8891
- "filter": "document(SMGeographicMaster.geogLevelType).code=='GE002' && SMGeographicMaster.activestatus == true",
8892
- "return_fields": "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,geogLevelCode:SMGeographicMaster.geogLevelCode,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
8865
+ db_name: _dbName,
8866
+ queryid: "2daa7e4a-bff4-4d1c-a5f9-d0fa6c82bd4a",
8867
+ filter: {
8868
+ code: "GE002",
8869
+ activestatus: true
8870
+ }
8893
8871
  };
8894
8872
  },
8895
- state_by_country: function state_by_country(geogLevelCode) {
8896
- return {
8897
- "db_name": _dbName,
8898
- "entity": "SMGeographicMaster",
8899
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='state' && lower(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)==lower('".concat(geogLevelCode, "')"),
8900
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8901
- };
8873
+ state_by_country: function state_by_country(code) {
8874
+ return geoQuery("state", code);
8902
8875
  },
8903
- district_by_state: function district_by_state(geogLevelCode) {
8904
- return {
8905
- "db_name": _dbName,
8906
- "entity": "SMGeographicMaster",
8907
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='district' && lower(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)==lower('".concat(geogLevelCode, "')"),
8908
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8909
- };
8876
+ district_by_state: function district_by_state(code) {
8877
+ return geoQuery("district", code);
8910
8878
  },
8911
- city_by_district: function city_by_district(geogLevelCode) {
8912
- return {
8913
- "db_name": _dbName,
8914
- "entity": "SMGeographicMaster",
8915
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='city' && lower(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)==lower('".concat(geogLevelCode, "')"),
8916
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8917
- };
8879
+ city_by_district: function city_by_district(code) {
8880
+ return geoQuery("city", code);
8918
8881
  },
8919
- pincode_by_city: function pincode_by_city(geogLevelCode) {
8920
- return {
8921
- "db_name": _dbName,
8922
- "entity": "SMGeographicMaster",
8923
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='pincode' && lower(document(SMGeographicMaster.parentGeogLevelCode).geogLevelCode)==lower('".concat(geogLevelCode, "')"),
8924
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8925
- };
8882
+ pincode_by_city: function pincode_by_city(code) {
8883
+ return geoQuery("pincode", code);
8926
8884
  },
8885
+ // without parent code
8927
8886
  state_by_country_: function state_by_country_() {
8928
- return {
8929
- "db_name": _dbName,
8930
- "entity": "SMGeographicMaster",
8931
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='state'",
8932
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8933
- };
8887
+ return geoQuery("state");
8934
8888
  },
8935
8889
  district_by_state_: function district_by_state_() {
8936
- return {
8937
- "db_name": _dbName,
8938
- "entity": "SMGeographicMaster",
8939
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='district'",
8940
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8941
- };
8890
+ return geoQuery("district");
8942
8891
  },
8943
8892
  city_by_district_: function city_by_district_() {
8944
- return {
8945
- "db_name": _dbName,
8946
- "entity": "SMGeographicMaster",
8947
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='city'",
8948
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8949
- };
8893
+ return geoQuery("city");
8950
8894
  },
8951
8895
  pincode_by_city_: function pincode_by_city_() {
8952
- return {
8953
- "db_name": _dbName,
8954
- "entity": "SMGeographicMaster",
8955
- "filter": "SMGeographicMaster.activestatus==true && lower(document(SMGeographicMaster.geogLevelType).display)=='pincode'",
8956
- "return_fields": "{_id:SMGeographicMaster._id, id:SMGeographicMaster.id, geogLevelType:document(SMGeographicMaster.geogLevelType), geogLevelCode:SMGeographicMaster.geogLevelCode, geogLevelName:SMGeographicMaster.geogLevelName, parentGeogLevelType:document(SMGeographicMaster.parentGeogLevelType), parentGeogLevelCode:document(SMGeographicMaster.parentGeogLevelCode), active: SMGeographicMaster.activestatus,_key:SMGeographicMaster._key}"
8957
- };
8896
+ return geoQuery("pincode");
8958
8897
  }
8959
8898
  };
8960
8899
 
@@ -9361,11 +9300,11 @@ var fetchMaster$8 = function fetchMaster(name, query) {
9361
9300
  _context3.n = 1;
9362
9301
  return fetchData({
9363
9302
  body: query
9364
- }, __readDocumentUrl__);
9303
+ }, __baseUrl__$1);
9365
9304
  case 1:
9366
9305
  data = _context3.v;
9367
9306
  resolve({
9368
- data: data.result,
9307
+ data: data,
9369
9308
  name: name
9370
9309
  });
9371
9310
  case 2:
@@ -9413,13 +9352,7 @@ var PRACTITIONER_GET_BY_ID = createAsyncThunk("practitionerMasterSlice/practitio
9413
9352
  _ref7,
9414
9353
  rejectWithValue,
9415
9354
  id,
9416
- masterlist,
9417
9355
  data,
9418
- country_data,
9419
- state_data,
9420
- district_data,
9421
- city_data,
9422
- pincode_data,
9423
9356
  readJSON,
9424
9357
  _args5 = arguments,
9425
9358
  _t2;
@@ -9433,44 +9366,44 @@ var PRACTITIONER_GET_BY_ID = createAsyncThunk("practitionerMasterSlice/practitio
9433
9366
  _context5.n = 2;
9434
9367
  return loopMasters$8();
9435
9368
  case 2:
9436
- masterlist = _context5.v;
9369
+ _context5.v;
9437
9370
  _context5.n = 3;
9438
9371
  return fetchData({
9439
9372
  body: JSON.stringify(queries$o.practitioner_by_id(id))
9440
- }, __readDocumentUrl__);
9373
+ }, __baseUrl__$1);
9441
9374
  case 3:
9442
9375
  data = _context5.v;
9443
9376
  _context5.n = 4;
9444
9377
  return fetchData({
9445
9378
  body: JSON.stringify(masterqueries.country())
9446
- }, __readDocumentUrl__);
9379
+ }, __baseUrl__$1);
9447
9380
  case 4:
9448
- country_data = _context5.v;
9381
+ _context5.v;
9449
9382
  _context5.n = 5;
9450
9383
  return fetchData({
9451
9384
  body: JSON.stringify(masterqueries.state_by_country_())
9452
- }, __readDocumentUrl__);
9385
+ }, __baseUrl__$1);
9453
9386
  case 5:
9454
- state_data = _context5.v;
9387
+ _context5.v;
9455
9388
  _context5.n = 6;
9456
9389
  return fetchData({
9457
9390
  body: JSON.stringify(masterqueries.district_by_state_())
9458
- }, __readDocumentUrl__);
9391
+ }, __baseUrl__$1);
9459
9392
  case 6:
9460
- district_data = _context5.v;
9393
+ _context5.v;
9461
9394
  _context5.n = 7;
9462
9395
  return fetchData({
9463
9396
  body: JSON.stringify(masterqueries.city_by_district_())
9464
- }, __readDocumentUrl__);
9397
+ }, __baseUrl__$1);
9465
9398
  case 7:
9466
- city_data = _context5.v;
9399
+ _context5.v;
9467
9400
  _context5.n = 8;
9468
9401
  return fetchData({
9469
9402
  body: JSON.stringify(masterqueries.pincode_by_city_())
9470
- }, __readDocumentUrl__);
9403
+ }, __baseUrl__$1);
9471
9404
  case 8:
9472
- pincode_data = _context5.v;
9473
- readJSON = generateReadJSON$5(data.result[0] ? data.result[0] : null, masterlist, country_data === null || country_data === void 0 ? void 0 : country_data.result, state_data === null || state_data === void 0 ? void 0 : state_data.result, district_data === null || district_data === void 0 ? void 0 : district_data.result, city_data === null || city_data === void 0 ? void 0 : city_data.result, pincode_data === null || pincode_data === void 0 ? void 0 : pincode_data.result);
9405
+ _context5.v;
9406
+ readJSON = generateReadJSON$5(data[0] ? data[0] : null);
9474
9407
  return _context5.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
9475
9408
  data: readJSON
9476
9409
  }));
@@ -9487,7 +9420,6 @@ var PRACTITIONER_COUNTRY_MASTER = createAsyncThunk("practitionerMasterSlice/prac
9487
9420
  var payload,
9488
9421
  _ref9,
9489
9422
  rejectWithValue,
9490
- _data$result,
9491
9423
  data,
9492
9424
  arr,
9493
9425
  _args6 = arguments,
@@ -9502,12 +9434,12 @@ var PRACTITIONER_COUNTRY_MASTER = createAsyncThunk("practitionerMasterSlice/prac
9502
9434
  _context6.n = 2;
9503
9435
  return fetchData({
9504
9436
  body: JSON.stringify(masterqueries.country())
9505
- }, __readDocumentUrl__);
9437
+ }, __baseUrl__$1);
9506
9438
  case 2:
9507
9439
  data = _context6.v;
9508
9440
  arr = [];
9509
- if (Array.isArray(data.result) && (data === null || data === void 0 || (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.length) > 0) {
9510
- data === null || data === void 0 || data.result.map(function (val) {
9441
+ if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
9442
+ data === null || data === void 0 || data.map(function (val) {
9511
9443
  arr.push(_objectSpread2({
9512
9444
  label: val.geogLevelName,
9513
9445
  value: val._id
@@ -9530,7 +9462,6 @@ var PRACTITIONER_STATE_MASTER = createAsyncThunk("practitionerMasterSlice/practi
9530
9462
  var payload,
9531
9463
  _ref1,
9532
9464
  rejectWithValue,
9533
- _data$result2,
9534
9465
  geogLevelCode,
9535
9466
  data,
9536
9467
  arr,
@@ -9546,12 +9477,12 @@ var PRACTITIONER_STATE_MASTER = createAsyncThunk("practitionerMasterSlice/practi
9546
9477
  _context7.n = 2;
9547
9478
  return fetchData({
9548
9479
  body: JSON.stringify(masterqueries.state_by_country(geogLevelCode))
9549
- }, __readDocumentUrl__);
9480
+ }, __baseUrl__$1);
9550
9481
  case 2:
9551
9482
  data = _context7.v;
9552
9483
  arr = [];
9553
- if (Array.isArray(data.result) && (data === null || data === void 0 || (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : _data$result2.length) > 0) {
9554
- data === null || data === void 0 || data.result.map(function (val) {
9484
+ if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
9485
+ data === null || data === void 0 || data.map(function (val) {
9555
9486
  arr.push(_objectSpread2({
9556
9487
  label: val.geogLevelName,
9557
9488
  value: val._id
@@ -9574,7 +9505,6 @@ var PRACTITIONER_DISTRICT_MASTER = createAsyncThunk("practitionerMasterSlice/pra
9574
9505
  var payload,
9575
9506
  _ref11,
9576
9507
  rejectWithValue,
9577
- _data$result3,
9578
9508
  geogLevelCode,
9579
9509
  data,
9580
9510
  arr,
@@ -9590,12 +9520,12 @@ var PRACTITIONER_DISTRICT_MASTER = createAsyncThunk("practitionerMasterSlice/pra
9590
9520
  _context8.n = 2;
9591
9521
  return fetchData({
9592
9522
  body: JSON.stringify(masterqueries.district_by_state(geogLevelCode))
9593
- }, __readDocumentUrl__);
9523
+ }, __baseUrl__$1);
9594
9524
  case 2:
9595
9525
  data = _context8.v;
9596
9526
  arr = [];
9597
- if (Array.isArray(data.result) && (data === null || data === void 0 || (_data$result3 = data.result) === null || _data$result3 === void 0 ? void 0 : _data$result3.length) > 0) {
9598
- data === null || data === void 0 || data.result.map(function (val) {
9527
+ if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
9528
+ data === null || data === void 0 || data.map(function (val) {
9599
9529
  arr.push(_objectSpread2({
9600
9530
  label: val.geogLevelName,
9601
9531
  value: val._id
@@ -9618,7 +9548,6 @@ var PRACTITIONER_CITY_MASTER = createAsyncThunk("practitionerMasterSlice/practit
9618
9548
  var payload,
9619
9549
  _ref13,
9620
9550
  rejectWithValue,
9621
- _data$result4,
9622
9551
  geogLevelCode,
9623
9552
  data,
9624
9553
  arr,
@@ -9634,12 +9563,12 @@ var PRACTITIONER_CITY_MASTER = createAsyncThunk("practitionerMasterSlice/practit
9634
9563
  _context9.n = 2;
9635
9564
  return fetchData({
9636
9565
  body: JSON.stringify(masterqueries.city_by_district(geogLevelCode))
9637
- }, __readDocumentUrl__);
9566
+ }, __baseUrl__$1);
9638
9567
  case 2:
9639
9568
  data = _context9.v;
9640
9569
  arr = [];
9641
- if (Array.isArray(data.result) && (data === null || data === void 0 || (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : _data$result4.length) > 0) {
9642
- data === null || data === void 0 || data.result.map(function (val) {
9570
+ if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
9571
+ data === null || data === void 0 || data.map(function (val) {
9643
9572
  arr.push(_objectSpread2({
9644
9573
  label: val.geogLevelName,
9645
9574
  value: val._id
@@ -9662,7 +9591,6 @@ var PRACTITIONER_PINCODE_MASTER = createAsyncThunk("practitionerMasterSlice/prac
9662
9591
  var payload,
9663
9592
  _ref15,
9664
9593
  rejectWithValue,
9665
- _data$result5,
9666
9594
  geogLevelCode,
9667
9595
  data,
9668
9596
  arr,
@@ -9678,12 +9606,12 @@ var PRACTITIONER_PINCODE_MASTER = createAsyncThunk("practitionerMasterSlice/prac
9678
9606
  _context0.n = 2;
9679
9607
  return fetchData({
9680
9608
  body: JSON.stringify(masterqueries.pincode_by_city(geogLevelCode))
9681
- }, __readDocumentUrl__);
9609
+ }, __baseUrl__$1);
9682
9610
  case 2:
9683
9611
  data = _context0.v;
9684
9612
  arr = [];
9685
- if (Array.isArray(data.result) && (data === null || data === void 0 || (_data$result5 = data.result) === null || _data$result5 === void 0 ? void 0 : _data$result5.length) > 0) {
9686
- data === null || data === void 0 || data.result.map(function (val) {
9613
+ if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
9614
+ data === null || data === void 0 || data.map(function (val) {
9687
9615
  arr.push(_objectSpread2({
9688
9616
  label: val.geogLevelName,
9689
9617
  value: val._id
@@ -39547,9 +39475,12 @@ var queries$2 = {
39547
39475
  codingMasterQuery: function codingMasterQuery(name) {
39548
39476
  return {
39549
39477
  db_name: _dbName,
39550
- entity: "CodingMaster",
39551
- filter: "CodingMaster.Type== '".concat(name, "' && CodingMaster.activestatus==true && CodingMaster.status==true"),
39552
- return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')"
39478
+ queryid: "95931016-caf1-413c-8bf5-96f05c5709fb",
39479
+ filter: {
39480
+ type: "".concat(name),
39481
+ status: true,
39482
+ activestatus: true
39483
+ }
39553
39484
  };
39554
39485
  }
39555
39486
  };
@@ -39668,11 +39599,11 @@ var fetchMaster = function fetchMaster(name, query) {
39668
39599
  _context3.n = 1;
39669
39600
  return fetchData({
39670
39601
  body: query
39671
- }, __readDocumentUrl__);
39602
+ }, __baseUrl__$1);
39672
39603
  case 1:
39673
39604
  data = _context3.v;
39674
39605
  resolve({
39675
- data: data.result,
39606
+ data: data,
39676
39607
  name: name
39677
39608
  });
39678
39609
  case 2:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.139",
3
+ "version": "0.1.140",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -23,6 +23,7 @@
23
23
  "es6-promise": "^4.2.8",
24
24
  "keycloak-js": "^11.0.2",
25
25
  "moment": "^2.29.1",
26
+ "react": "^17.0.2",
26
27
  "redux": "^4.0.5",
27
28
  "whatwg-fetch": "^3.4.0"
28
29
  },