test_class.declarator: instance  = null
test_class.modifier: private
test_class.original_string: private MyDMZSyncServiceImpl instance  = null;
test_class.type: MyDMZSyncServiceImpl
test_class.var_name: instance
test_class.declarator: currentSP  = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient currentSP  = null;
test_class.type: StandardizedPatient
test_class.var_name: currentSP
test_class.declarator: dataFromDMZ  = null
test_class.modifier: private
test_class.original_string: private String dataFromDMZ  = null;
test_class.type: String
test_class.var_name: dataFromDMZ
test_class.declarator: expectedURL = null
test_class.modifier: private
test_class.original_string: private String expectedURL = null;
test_class.type: String
test_class.var_name: expectedURL
test_class.declarator: locale = null
test_class.modifier: private
test_class.original_string: private String locale = null;
test_class.type: String
test_class.var_name: locale
test_class.declarator: testData = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient testData = null;
test_class.type: StandardizedPatient
test_class.var_name: testData
test_class.declarator: patient1 = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient patient1 = null;
test_class.type: StandardizedPatient
test_class.var_name: patient1
test_class.declarator: patient2 = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient patient2 = null;
test_class.type: StandardizedPatient
test_class.var_name: patient2
test_class.declarator: returnData = null
test_class.modifier: private
test_class.original_string: private String returnData = null;
test_class.type: String
test_class.var_name: returnData
test_class.file: OsceManager/src/test/java/ch/unibas/medizin/osce/server/DMZSyncServiceImplTest.java
test_class.identifier: DMZSyncServiceImplTest
test_class.superclass: extends AbstractJUnit4SpringContextTests
test_case.body: @Test 
      public void testPullFemaleFromDMZ() {
          testData =  new StandardizedPatient();
          testData.setName("patient2");
          testData.persist();
          testData.merge();
  
  		dataFromDMZ  = "{\"class\":\"sp_portal.local.StandardizedPatient\",\"id\":"+testData.getId()+",\"anamnesisForm\":{\"class\":\"sp_portal.local.AnamnesisForm\",\"id\":5,\"anamnesisChecksValues\":[{\"class\":\"sp_portal.local.AnamnesisChecksValue\",\"id\":10,\"anamnesisCheck\":{\"class\":\"sp_portal.local.AnamnesisCheck\",\"id\":8,\"origId\":5,\"sortOrder\":6,\"text\":\"Leiden Sie unter Diabetes?\",\"title\":{\"class\":\"sp_portal.local.AnamnesisCheck\",\"id\":2,\"origId\":11,\"sortOrder\":5,\"text\":\"Disease history category\",\"title\":null,\"type\":4,\"userSpecifiedOrder\":null,\"value\":\"\"},\"type\":1,\"userSpecifiedOrder\":null,\"value\":\"\"},\"anamnesisChecksValue\":null,\"anamnesisForm\":{\"_ref\":\"../..\",\"class\":\"sp_portal.local.AnamnesisForm\"},\"comment\":null,\"origId\":15,\"truth\":false},{\"class\":\"sp_portal.local.AnamnesisChecksValue\",\"id\":9,\"anamnesisCheck\":{\"class\":\"sp_portal.local.AnamnesisCheck\",\"id\":4,\"origId\":1,\"sortOrder\":2,\"text\":\"Rauchen Sie?\",\"title\":{\"class\":\"sp_portal.local.AnamnesisCheck\",\"id\":1,\"origId\":10,\"sortOrder\":1,\"text\":\"Personal lifestyle category\",\"title\":null,\"type\":4,\"userSpecifiedOrder\":null,\"value\":\"\"},\"type\":1,\"userSpecifiedOrder\":null,\"value\":\"\"},\"anamnesisChecksValue\":null,\"anamnesisForm\":{\"_ref\":\"../..\",\"class\":\"sp_portal.local.AnamnesisForm\"},\"comment\":null,\"origId\":14,\"truth\":false}],\"createDate\":\"2009-09-18T16:00:00Z\",\"origId\":6,\"scars\":[],\"standardizedPatients\":[{\"_ref\":\"../..\",\"class\":\"sp_portal.local.StandardizedPatient\"}]},\"bankaccount\":{\"class\":\"sp_portal.local.Bankaccount\",\"id\":5,\"bankName\":\"KTS\",\"bic\":\"BENDSFF1JEV\",\"city\":null,\"iban\":\"CH78 5685 7565 4364 7\",\"origId\":31,\"ownerName\":null,\"postalCode\":null,\"standardizedPatients\":[{\"_ref\":\"../..\",\"class\":\"sp_portal.local.StandardizedPatient\"}]},\"birthday\":\"1965-09-23T16:00:00Z\",\"city\":\"Basel\",\"description\":null,\"email\":\"beddebu@hss.ch\",\"gender\":2,\"height\":182,\"immagePath\":null,\"maritalStatus\":null,\"mobile\":\"078 586 29 84\",\"name\":\"Buser\",\"nationality\":{\"class\":\"sp_portal.local.Nationality\",\"id\":2,\"nationality\":\"Deutschland\",\"origId\":6},\"origId\":23,\"postalCode\":4051,\"preName\":\"Bettina\",\"profession\":{\"class\":\"sp_portal.local.Profession\",\"id\":5,\"origId\":6,\"profession\":\"Florist/in\"},\"socialInsuranceNo\":null,\"street\":\"Rankenbergweg 1\",\"telephone\":null,\"telephone2\":null,\"videoPath\":null,\"weight\":82,\"workPermission\":null}";
  
                  
          try {
  			instance.pullFromDMZ(testData.getId());
  		} catch (Exception e) {
  			// TODO Auto-generated catch block
  			e.printStackTrace();
  			e.getCause().printStackTrace();
  			Assert.fail("error occured " + e.getMessage());
  		}
  		StandardizedPatient patient = StandardizedPatient.findStandardizedPatient(testData.getId());
  	
          assertEquals(testData.getId(), (Long)instance.spParam);
          assertEquals(Gender.FEMALE,patient.getGender());
          assertEquals("Buser",patient.getName());
  
          assertEquals("Bettina",patient.getPreName());
  
          assertEquals("Rankenbergweg 1",patient.getStreet());
  
          assertEquals("Basel",patient.getCity());
  
          assertEquals((Integer)4051,patient.getPostalCode());
  
          assertEquals(null,patient.getTelephone());
  
          assertEquals(null,patient.getTelephone2());
  
          assertEquals("078 586 29 84",patient.getMobile());
  
          assertEquals((Integer)182,patient.getHeight());
  
          assertEquals((Integer)82,patient.getWeight());
  
          assertEquals(null,patient.getImmagePath());
  
          assertEquals(null,patient.getVideoPath());
  
      }
test_case.class_method_signature: DMZSyncServiceImplTest.testPullFemaleFromDMZ()
test_case.full_signature: @Test public void testPullFemaleFromDMZ()
test_case.identifier: testPullFemaleFromDMZ
test_case.invocations: setName persist merge getId pullFromDMZ getId printStackTrace printStackTrace getCause fail getMessage findStandardizedPatient getId assertEquals getId assertEquals getGender assertEquals getName assertEquals getPreName assertEquals getStreet assertEquals getCity assertEquals getPostalCode assertEquals getTelephone assertEquals getTelephone2 assertEquals getMobile assertEquals getHeight assertEquals getWeight assertEquals getImmagePath assertEquals getVideoPath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPullFemaleFromDMZ()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: Log = Logger.getLogger(DMZSyncServiceImpl.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger Log = Logger.getLogger(DMZSyncServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: Log
focal_class.declarator: dmzSyncExceptionType = ""
focal_class.modifier: private static
focal_class.original_string: private static String dmzSyncExceptionType = "";
focal_class.type: String
focal_class.var_name: dmzSyncExceptionType
focal_class.declarator: errorMsg = ""
focal_class.modifier: private static
focal_class.original_string: private static String errorMsg = "";
focal_class.type: String
focal_class.var_name: errorMsg
focal_class.file: OsceManager/src/main/java/ch/unibas/medizin/osce/server/DMZSyncServiceImpl.java
focal_class.identifier: DMZSyncServiceImpl
focal_class.interfaces: implements
  		DMZSyncService
focal_class.class_method_signature: DMZSyncServiceImpl.pushToDMZ(Long standardizedPatientId,String locale)
focal_class.full_signature: @Override public List<String> pushToDMZ(Long standardizedPatientId,String locale)
focal_class.identifier: pushToDMZ
focal_class.modifiers: @Override public
focal_class.parameters: (Long standardizedPatientId,String locale)
focal_class.return: List<String>
focal_class.signature: List<String> pushToDMZ(Long standardizedPatientId,String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.processSendJson(String json,String locale)
focal_class.full_signature: private String processSendJson(String json,String locale)
focal_class.identifier: processSendJson
focal_class.modifiers: private
focal_class.parameters: (String json,String locale)
focal_class.return: String
focal_class.signature: String processSendJson(String json,String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getSendReturnErrorMessage(String json)
focal_class.full_signature: protected List<String> getSendReturnErrorMessage(String json)
focal_class.identifier: getSendReturnErrorMessage
focal_class.modifiers: protected
focal_class.parameters: (String json)
focal_class.return: List<String>
focal_class.signature: List<String> getSendReturnErrorMessage(String json)
focal_class.class_method_signature: DMZSyncServiceImpl.pullFromDMZ(Long standardizedPatientId)
focal_class.full_signature: @Override public void pullFromDMZ(Long standardizedPatientId)
focal_class.identifier: pullFromDMZ
focal_class.modifiers: @Override public
focal_class.parameters: (Long standardizedPatientId)
focal_class.return: void
focal_class.signature: void pullFromDMZ(Long standardizedPatientId)
focal_class.class_method_signature: DMZSyncServiceImpl.sendSync(String locale)
focal_class.full_signature: @Override public String sendSync(String locale)
focal_class.identifier: sendSync
focal_class.modifiers: @Override public
focal_class.parameters: (String locale)
focal_class.return: String
focal_class.signature: String sendSync(String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getSync(String locale)
focal_class.full_signature: @Override public void getSync(String locale)
focal_class.identifier: getSync
focal_class.modifiers: @Override public
focal_class.parameters: (String locale)
focal_class.return: void
focal_class.signature: void getSync(String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getReturnMessage(JSONObject myjson)
focal_class.full_signature: private String getReturnMessage(JSONObject myjson)
focal_class.identifier: getReturnMessage
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: String
focal_class.signature: String getReturnMessage(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.syncOsceDayAndTraining(JSONObject myjson)
focal_class.full_signature: private void syncOsceDayAndTraining(JSONObject myjson)
focal_class.identifier: syncOsceDayAndTraining
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: void
focal_class.signature: void syncOsceDayAndTraining(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.syncOsceDay(JSONObject myjson)
focal_class.full_signature: private void syncOsceDay(JSONObject myjson)
focal_class.identifier: syncOsceDay
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: void
focal_class.signature: void syncOsceDay(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.syncPatientInSemester(JSONObject myjson)
focal_class.full_signature: private void syncPatientInSemester(JSONObject myjson)
focal_class.identifier: syncPatientInSemester
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: void
focal_class.signature: void syncPatientInSemester(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.setOsceDays(JSONObject jsonObject,PatientInSemester semester)
focal_class.full_signature: private void setOsceDays(JSONObject jsonObject,PatientInSemester semester)
focal_class.identifier: setOsceDays
focal_class.modifiers: private
focal_class.parameters: (JSONObject jsonObject,PatientInSemester semester)
focal_class.return: void
focal_class.signature: void setOsceDays(JSONObject jsonObject,PatientInSemester semester)
focal_class.class_method_signature: DMZSyncServiceImpl.getSyncJsonData(String locale)
focal_class.full_signature: protected String getSyncJsonData(String locale)
focal_class.identifier: getSyncJsonData
focal_class.modifiers: protected
focal_class.parameters: (String locale)
focal_class.return: String
focal_class.signature: String getSyncJsonData(String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getOsceDayJsonStr(OsceDay osceDay)
focal_class.full_signature: private String getOsceDayJsonStr(OsceDay osceDay)
focal_class.identifier: getOsceDayJsonStr
focal_class.modifiers: private
focal_class.parameters: (OsceDay osceDay)
focal_class.return: String
focal_class.signature: String getOsceDayJsonStr(OsceDay osceDay)
focal_class.class_method_signature: DMZSyncServiceImpl.getSemesterJsonStr(Semester semester)
focal_class.full_signature: private String getSemesterJsonStr(Semester semester)
focal_class.identifier: getSemesterJsonStr
focal_class.modifiers: private
focal_class.parameters: (Semester semester)
focal_class.return: String
focal_class.signature: String getSemesterJsonStr(Semester semester)
focal_class.class_method_signature: DMZSyncServiceImpl.getPatientInSemester(PatientInSemester pis)
focal_class.full_signature: private String getPatientInSemester(PatientInSemester pis)
focal_class.identifier: getPatientInSemester
focal_class.modifiers: private
focal_class.parameters: (PatientInSemester pis)
focal_class.return: String
focal_class.signature: String getPatientInSemester(PatientInSemester pis)
focal_class.class_method_signature: DMZSyncServiceImpl.getOscesJsonStr(Osce osce)
focal_class.full_signature: private String getOscesJsonStr(Osce osce)
focal_class.identifier: getOscesJsonStr
focal_class.modifiers: private
focal_class.parameters: (Osce osce)
focal_class.return: String
focal_class.signature: String getOscesJsonStr(Osce osce)
focal_class.class_method_signature: DMZSyncServiceImpl.getStandardizedPatientJsonStr(PatientInSemester patient)
focal_class.full_signature: private String getStandardizedPatientJsonStr(PatientInSemester patient)
focal_class.identifier: getStandardizedPatientJsonStr
focal_class.modifiers: private
focal_class.parameters: (PatientInSemester patient)
focal_class.return: String
focal_class.signature: String getStandardizedPatientJsonStr(PatientInSemester patient)
focal_class.class_method_signature: DMZSyncServiceImpl.convertToString(Date date)
focal_class.full_signature: private String convertToString(Date date)
focal_class.identifier: convertToString
focal_class.modifiers: private
focal_class.parameters: (Date date)
focal_class.return: String
focal_class.signature: String convertToString(Date date)
focal_class.class_method_signature: DMZSyncServiceImpl.convertToDate(String dateStr)
focal_class.full_signature: private Date convertToDate(String dateStr)
focal_class.identifier: convertToDate
focal_class.modifiers: private
focal_class.parameters: (String dateStr)
focal_class.return: Date
focal_class.signature: Date convertToDate(String dateStr)
focal_class.class_method_signature: DMZSyncServiceImpl.setDMZSyncExceptionTypeAndErrorMsg(String type,String msg)
focal_class.full_signature: private void setDMZSyncExceptionTypeAndErrorMsg(String type,String msg)
focal_class.identifier: setDMZSyncExceptionTypeAndErrorMsg
focal_class.modifiers: private
focal_class.parameters: (String type,String msg)
focal_class.return: void
focal_class.signature: void setDMZSyncExceptionTypeAndErrorMsg(String type,String msg)
focal_class.class_method_signature: DMZSyncServiceImpl.updatePatient(StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.full_signature: private void updatePatient(StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.identifier: updatePatient
focal_class.modifiers: private
focal_class.parameters: (StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.return: void
focal_class.signature: void updatePatient(StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.class_method_signature: DMZSyncServiceImpl.updateChecksValue(AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.full_signature: private void updateChecksValue(AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.identifier: updateChecksValue
focal_class.modifiers: private
focal_class.parameters: (AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.return: void
focal_class.signature: void updateChecksValue(AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.class_method_signature: DMZSyncServiceImpl.saveChecksValue(AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.full_signature: private void saveChecksValue(AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.identifier: saveChecksValue
focal_class.modifiers: private
focal_class.parameters: (AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.return: void
focal_class.signature: void saveChecksValue(AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.class_method_signature: DMZSyncServiceImpl.preProcessData(String data)
focal_class.full_signature: public String preProcessData(String data)
focal_class.identifier: preProcessData
focal_class.modifiers: public
focal_class.parameters: (String data)
focal_class.return: String
focal_class.signature: String preProcessData(String data)
focal_class.class_method_signature: DMZSyncServiceImpl.findPatient(Long objectId)
focal_class.full_signature: protected StandardizedPatient findPatient(Long objectId)
focal_class.identifier: findPatient
focal_class.modifiers: protected
focal_class.parameters: (Long objectId)
focal_class.return: StandardizedPatient
focal_class.signature: StandardizedPatient findPatient(Long objectId)
focal_class.class_method_signature: DMZSyncServiceImpl.sendData(String json,String url)
focal_class.full_signature: protected String sendData(String json,String url)
focal_class.identifier: sendData
focal_class.modifiers: protected
focal_class.parameters: (String json,String url)
focal_class.return: String
focal_class.signature: String sendData(String json,String url)
focal_class.class_method_signature: DMZSyncServiceImpl.getDMZData(String url)
focal_class.full_signature: protected String getDMZData(String url)
focal_class.identifier: getDMZData
focal_class.modifiers: protected
focal_class.parameters: (String url)
focal_class.return: String
focal_class.signature: String getDMZData(String url)
focal_class.class_method_signature: DMZSyncServiceImpl.getHostAddress()
focal_class.full_signature: protected String getHostAddress()
focal_class.identifier: getHostAddress
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHostAddress()
focal_class.class_method_signature: DMZSyncServiceImpl.authenticate(HttpClient client, HttpMethodBase method)
focal_class.full_signature: private void authenticate(HttpClient client, HttpMethodBase method)
focal_class.identifier: authenticate
focal_class.modifiers: private
focal_class.parameters: (HttpClient client, HttpMethodBase method)
focal_class.return: void
focal_class.signature: void authenticate(HttpClient client, HttpMethodBase method)
focal_class.class_method_signature: DMZSyncServiceImpl.savePatient(StandardizedPatient patient)
focal_class.full_signature: protected void savePatient(StandardizedPatient patient)
focal_class.identifier: savePatient
focal_class.modifiers: protected
focal_class.parameters: (StandardizedPatient patient)
focal_class.return: void
focal_class.signature: void savePatient(StandardizedPatient patient)
focal_class.class_method_signature: DMZSyncServiceImpl.getRequest()
focal_class.full_signature:  HttpServletRequest getRequest()
focal_class.identifier: getRequest
focal_class.parameters: ()
focal_class.return: HttpServletRequest
focal_class.signature: HttpServletRequest getRequest()
focal_class.superclass: extends RemoteServiceServlet
focal_method.body: @Override
  	public void pullFromDMZ(Long standardizedPatientId)  throws DMZSyncException {
  		String url = getHostAddress() + "/DataImportExport/exportSP?id="	+ standardizedPatientId;
  		String data = getDMZData(url);
  		
  		data =preProcessData(data);
  		JSONDeserializer deserializer = new JSONDeserializer()
  				.use("anamnesisForm.createDate",
  						new DateTransformer("yyyy-MM-dd'T'HH:mm:ss'Z'"))
  				.use("birthday",
  						new DateTransformer("yyyy-MM-dd"))
  				.use("gender", new GenderTransformer())
  				.use("maritalStatus", new MaritalStatusTransformer())
  				.use("status",new SPStatusTransformer())
  				.use("workPermission", new WorkPermissionTransformer())
  				.use("anamnesisForm.anamnesischecksvalues.values.anamnesischeck.title.type", new AnamnesisChecksTypeTransformet())
  				.use("anamnesisForm.scars.values.traitType", new TraitTypeTransformet())
  				.use("anamnesisForm.anamnesischecksvalues.values.anamnesischeck.type", new AnamnesisChecksTypeTransformet());
  		
  		String unExpectedData=standardizedPatientId+"not found";
  		StandardizedPatient newPatient = null;
  		if(!data.equals(unExpectedData)){
  			try{
  				newPatient = (StandardizedPatient) (deserializer
  						.use(null, StandardizedPatient.class).deserialize(data));
  			}catch(flexjson.JSONException e){
  				Log.error("Error deserialize json data: "+e.getMessage());
  				throw new DMZSyncException(DMZSyncExceptionType.SYNC_PATIENT_EXCEPTION,"Error json data.");
  			}
  		}else{
  			throw new DMZSyncException(DMZSyncExceptionType.PATIENT_EXIST_EXCEPTION,"");
  		}
  
  		
  		
  		StandardizedPatient patient = StandardizedPatient.findStandardizedPatient(standardizedPatientId);
  	
  		if( patient != null){
  			if(newPatient!=null){
  				updatePatient(patient,newPatient);
  			}
  		}else{
  //			throw new DMZSyncException(DMZSyncExceptionType.PATIENT_EXIST_EXCEPTION,"");
  //			savePatient(newPatient);
  		}
  
  	}
focal_method.class_method_signature: DMZSyncServiceImpl.pullFromDMZ(Long standardizedPatientId)
focal_method.full_signature: @Override public void pullFromDMZ(Long standardizedPatientId)
focal_method.identifier: pullFromDMZ
focal_method.invocations: getHostAddress getDMZData preProcessData use use use use use use use use use equals deserialize use error getMessage findStandardizedPatient updatePatient
focal_method.modifiers: @Override public
focal_method.parameters: (Long standardizedPatientId)
focal_method.return: void
focal_method.signature: void pullFromDMZ(Long standardizedPatientId)